Class TitlePoolTemplate
- Namespace
- FishMMO.Shared.NameGeneration
- Assembly
- FishMMO.Shared.dll
Titles and places shared by every race in one or more categories, drawn on top of each race's own Titles. A pool for "Undead" gives every undead race grave-wardens and barrow-lords without repeating them on each template; a pool with no categories serves every race. Registered in TitlePoolRegistry on load.
[CreateAssetMenu(fileName = "New Title Pool", menuName = "FishMMO/Naming/Title Pool", order = 4)]
public class TitlePoolTemplate : CachedScriptableObject<TitlePoolTemplate>, ICachedObject
- Inheritance
-
ObjectScriptableObjectTitlePoolTemplate
- Implements
- Inherited Members
-
ScriptableObject.SetDirty()ScriptableObject.CreateInstance<T>()Object.GetEntityId()Object.GetInstanceID()Object.GetHashCode()Object.InstantiateAsync<T>(T)Object.InstantiateAsync<T>(T, Transform)Object.InstantiateAsync<T>(T, Vector3, Quaternion)Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion, Transform)Object.Instantiate(Object)Object.Instantiate(Object, Scene)Object.Instantiate<T>(T, InstantiateParameters)Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)Object.Instantiate(Object, Transform)Object.Instantiate<T>(T)Object.Instantiate<T>(T, Vector3, Quaternion)Object.Instantiate<T>(T, Vector3, Quaternion, Transform)Object.Instantiate<T>(T, Transform)Object.Destroy(Object)Object.DestroyImmediate(Object)Object.DontDestroyOnLoad(Object)Object.DestroyObject(Object)Object.FindObjectsOfType<T>()Object.FindObjectsByType<T>(FindObjectsSortMode)Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)Object.FindObjectOfType<T>()Object.FindFirstObjectByType<T>()Object.FindAnyObjectByType<T>()Object.FindFirstObjectByType<T>(FindObjectsInactive)Object.FindAnyObjectByType<T>(FindObjectsInactive)Object.FindObjectsByType<T>()Object.FindObjectsByType<T>(FindObjectsInactive)Object.ToString()Object.nameObject.hideFlags
Fields
Categories
[Tooltip("Race categories this pool serves (RaceTemplate.Category, case-insensitive). Empty means every race.")]
public string[] Categories
Field Value
- string[]
Places
[Tooltip("Places shared by these categories, merged after the race's own places.")]
public string[] Places
Field Value
- string[]
Titles
[Tooltip("Titles every race in these categories can draw, merged after the race's own.")]
public SerializableRaceTitles Titles
Field Value
Properties
AppliesToAll
True when the pool serves every race.
public bool AppliesToAll { get; }
Property Value
RuntimeTitles
The pool's titles as the builder consumes them; rebuilt after InvalidateRuntime().
public RaceTitles RuntimeTitles { get; }
Property Value
Methods
AppliesTo(string)
True when a race of category may draw from this pool.
public bool AppliesTo(string category)
Parameters
categorystring
Returns
InvalidateRuntime()
Drops the cached runtime titles so edits to Titles are seen.
public void InvalidateRuntime()
OnLoad(string, string, int)
Virtual method called when a ScriptableObject is successfully added to the cache. Derived classes can override this method to add custom logging, initialization, or other specific logic that should occur upon caching.
public override void OnLoad(string typeName, string resourceName, int resourceID)
Parameters
typeNamestringThe name of the type (e.g., "RaceTemplate") under which the object is currently being cached.
resourceNamestringThe name of the ScriptableObject asset (e.g., "HumanRace").
resourceIDintThe deterministic ID generated for the resource instance.
OnUnload(string, string, int)
Virtual method called when a ScriptableObject is successfully removed from the cache. Derived classes can override this method to add custom logging, cleanup, or other specific logic that should occur upon uncaching.
public override void OnUnload(string typeName, string resourceName, int resourceID)