Game.UI.TypeNames
Assembly: Assembly-CSharp (runtime game assembly)
Namespace: Game.UI
Type: public static class TypeNames
Base: System.Object
Summary:
A convenience container of string constants and readonly fields that represent UI-related prefab/type names used by the game's UI systems (tutorials, policies, etc.). These values are intended to be used when registering, looking up, or referencing UI prefab types and UI group names across the UI/modding codebase.
Fields
-
public const string kTutorialsGroup = "tutorials"
A group name used to categorize tutorial-related prefabs or UI elements. -
public const string kEditorTutorialsGroup = "editorTutorials"
A group name used specifically for editor-mode tutorials. -
public static readonly string kAdvisorCategory = "tutorials.AdvisorCategory"
Type/name for advisor category prefabs or UI entries. -
public static readonly string kAdvisorItem = "tutorials.AdvisorItem"
Type/name for an advisor item prefab or UI element. -
public static readonly string kTutorial = "tutorials.Tutorial"
Type/name used for a tutorial prefab or definition. -
public static readonly string kTutorialTrigger = "tutorials.Trigger"
Type/name representing a tutorial trigger component or asset. -
public static readonly string kTutorialPhase = "tutorials.Phase"
Type/name representing a tutorial phase asset or definition. -
public static readonly string kTutorialList = "tutorials.List"
Type/name for a collection/list of tutorials. -
public static readonly string kTutorialBalloonUITarget = typeof(TutorialBalloonPrefab.BalloonUITarget).FullName ?? ""
Holds the fully qualified CLR name of TutorialBalloonPrefab.BalloonUITarget if available; otherwise an empty string. Useful when you need the runtime type name (for prefab lookups or serialized references) but must handle the possibility the type is missing or renamed. -
public const string kPoliciesGroup = "policies"
A group name used to categorize policy-related prefabs or UI elements. -
public static readonly string kPolicy = "policies.Policy"
Type/name for a policy prefab or definition. -
public static readonly string kPolicySlider = "policies.Slider"
Type/name for a policy slider UI element/prefab.
Properties
- None (this is a static utility class containing fields only).
Constructors
- None (static class — no instance constructors).
Methods
- None (no methods defined).
Usage Example
using Game.UI;
using Game.Prefabs;
// Example: lookup or register a prefab/type using the constants
string group = TypeNames.kTutorialsGroup;
string tutorialType = TypeNames.kTutorial;
// Example: get the runtime full name for the balloon UI target (may be empty if the type isn't present)
string balloonTargetName = TypeNames.kTutorialBalloonUITarget;
if (!string.IsNullOrEmpty(balloonTargetName))
{
// use balloonTargetName for reflection/prefab lookup/serialization as needed
}
// Example: registering a UI prefab under a group (pseudo-code)
PrefabManager.RegisterPrefab(group, tutorialType, myTutorialPrefab);
Notes: - These values are plain strings and relied upon across UI/prefab systems; changing them will break lookups unless all consumers are updated. - kTutorialBalloonUITarget uses typeof(...).FullName with a null-coalescing fallback — check for an empty string before using it.