Class ScriptableRuntimeSingletonRegistry<TSelf, TValue>
ScriptableRuntimeSingleton-backed registry for runtime-accessible cached data. Must be placed in Resources folder or its subfolders.
Inheritance
Object
ScriptableObject
ScriptableRuntimeSingleton<TSelf>
ScriptableRuntimeSingletonRegistry<TSelf, TValue>
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.ToString()
Object.name
Object.hideFlags
Namespace: Glitch9.IO
Assembly: Glitch9.IO.dll
Syntax
public abstract class ScriptableRuntimeSingletonRegistry<TSelf, TValue> : ScriptableRuntimeSingleton<TSelf> where TSelf : ScriptableRuntimeSingletonRegistry<TSelf, TValue> where TValue : class, IData
Type Parameters
| Name | Description |
|---|---|
| TSelf | |
| TValue |
Fields
| Edit this page View Sourcedata
Declaration
[SerializeField]
protected List<TValue> data
Field Value
| Type | Description |
|---|---|
| List<TValue> |
Properties
| Edit this page View SourceCount
Declaration
public static int Count { get; }
Property Value
| Type | Description |
|---|---|
| int |
Data
Returns a snapshot list reference (do not replace contents without calling SetData).
Declaration
public static IReadOnlyList<TValue> Data { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<TValue> |
IsEmpty
Declaration
public static bool IsEmpty { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
| Edit this page View SourceAdd(TValue)
Declaration
public static bool Add(TValue value)
Parameters
| Type | Name | Description |
|---|---|---|
| TValue | value |
Returns
| Type | Description |
|---|---|
| bool |
Clear()
Declaration
public static void Clear()
Contains(TValue)
Declaration
public static bool Contains(TValue value)
Parameters
| Type | Name | Description |
|---|---|---|
| TValue | value |
Returns
| Type | Description |
|---|---|
| bool |
ContainsKey(string)
Declaration
public static bool ContainsKey(string id)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id |
Returns
| Type | Description |
|---|---|
| bool |
ElementAt(int)
Declaration
public static TValue ElementAt(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index |
Returns
| Type | Description |
|---|---|
| TValue |
EnsureInitialized()
Declaration
protected TSelf EnsureInitialized()
Returns
| Type | Description |
|---|---|
| TSelf |
Find(Predicate<TValue>)
Declaration
public static TValue Find(Predicate<TValue> match)
Parameters
| Type | Name | Description |
|---|---|---|
| Predicate<TValue> | match |
Returns
| Type | Description |
|---|---|
| TValue |
Get(string)
Declaration
public static TValue Get(string id)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id |
Returns
| Type | Description |
|---|---|
| TValue |
GetAt(int)
Declaration
public static TValue GetAt(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index |
Returns
| Type | Description |
|---|---|
| TValue |
GetByName(string)
Declaration
public static TValue GetByName(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name |
Returns
| Type | Description |
|---|---|
| TValue |
GetIndex(string)
Declaration
public static int GetIndex(string id)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id |
Returns
| Type | Description |
|---|---|
| int |
OnInitialize()
Called once when the registry is first accessed at runtime. Override to perform custom initialization logic.
Declaration
protected virtual void OnInitialize()
Remove(string)
Declaration
public static bool Remove(string id)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id |
Returns
| Type | Description |
|---|---|
| bool |
Remove(TValue)
Declaration
public static bool Remove(TValue value)
Parameters
| Type | Name | Description |
|---|---|---|
| TValue | value |
Returns
| Type | Description |
|---|---|
| bool |
RemoveAll(Predicate<TValue>)
Declaration
public static bool RemoveAll(Predicate<TValue> match)
Parameters
| Type | Name | Description |
|---|---|---|
| Predicate<TValue> | match |
Returns
| Type | Description |
|---|---|
| bool |
RemoveAt(int)
Declaration
public static bool RemoveAt(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index |
Returns
| Type | Description |
|---|---|
| bool |
RemoveInvalidEntries()
Declaration
public static void RemoveInvalidEntries()
Set(int, TValue)
Declaration
public static void Set(int index, TValue value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | |
| TValue | value |
SetData(List<TValue>)
Declaration
public static void SetData(List<TValue> value)
Parameters
| Type | Name | Description |
|---|---|---|
| List<TValue> | value |
Sort(Comparison<TValue>)
Declaration
public static void Sort(Comparison<TValue> comparison)
Parameters
| Type | Name | Description |
|---|---|---|
| Comparison<TValue> | comparison |
ToEnumerable()
Declaration
public static IEnumerable<TValue> ToEnumerable()
Returns
| Type | Description |
|---|---|
| IEnumerable<TValue> |
ToList()
Declaration
public static List<TValue> ToList()
Returns
| Type | Description |
|---|---|
| List<TValue> |
TryGetValue(string, out TValue)
Declaration
public static bool TryGetValue(string id, out TValue value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id | |
| TValue | value |
Returns
| Type | Description |
|---|---|
| bool |