Class DataSetScriptableObject<TItem, TOpenSet>
Data set stored as a scriptable object.
Inheritance
Object
ScriptableObject
DataSetScriptableObject<TItem, TOpenSet>
Inherited Members
ScriptableObject.SetDirty()
ScriptableObject.CreateInstance<T>()
Object.GetInstanceID()
Object.GetHashCode()
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
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.FindObjectOfType<T>()
Object.ToString()
Object.name
Object.hideFlags
Namespace: InsaneScatterbrain.ScriptGraph
Syntax
[Serializable]
public abstract class DataSetScriptableObject<TItem, TOpenSet> : VersionedScriptableObject, IVersioned, IDataSet<TItem>, IDataSet where TItem : IDataSetItem where TOpenSet : IOpenDataSet<TItem>
Type Parameters
| Name | Description |
|---|---|
| TItem | Type of the items stored in the data set. |
| TOpenSet | The type of the open set. |
Properties
Names
Declaration
public IReadOnlyCollection<string> Names { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyCollection<string> |
OpenSet
Gets the less restricted set of items for protected use.
Declaration
protected abstract TOpenSet OpenSet { get; }
Property Value
| Type | Description |
|---|---|
| TOpenSet |
OrderedIds
Declaration
public ReadOnlyCollection<string> OrderedIds { get; }
Property Value
| Type | Description |
|---|---|
| ReadOnlyCollection<string> |
Methods
Add(TItem)
Adds an item to the dataset.
Declaration
public virtual void Add(TItem element)
Parameters
| Type | Name | Description |
|---|---|---|
| TItem | element | The item to add. |
ContainsId(string)
Declaration
public bool ContainsId(string id)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id |
Returns
| Type | Description |
|---|---|
| bool |
ContainsName(string)
Declaration
public bool ContainsName(string elementName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | elementName |
Returns
| Type | Description |
|---|---|
| bool |
Get(string)
Gets the item with the given ID.
Declaration
protected TItem Get(string id)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id | The item's ID. |
Returns
| Type | Description |
|---|---|
| TItem | The item. |
GetByName(string)
Gets the item with the given name.
Declaration
protected TItem GetByName(string elementName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | elementName | The item's name. |
Returns
| Type | Description |
|---|---|
| TItem | The item. |
GetName(string)
Declaration
public string GetName(string id)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id |
Returns
| Type | Description |
|---|---|
| string |
Move(string, int)
Declaration
public virtual void Move(string id, int newIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id | |
| int | newIndex |
Remove(string)
Declaration
public virtual void Remove(string id)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id |
Rename(string, string)
Declaration
public virtual void Rename(string id, string newName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id | |
| string | newName |
Events
OnAdded
Declaration
public event Action<string> OnAdded
Event Type
| Type | Description |
|---|---|
| Action<string> |
OnMoved
Declaration
public event Action<int, int> OnMoved
Event Type
| Type | Description |
|---|---|
| Action<int, int> |
OnRemoved
Declaration
public event Action<string, string> OnRemoved
Event Type
| Type | Description |
|---|---|
| Action<string, string> |
OnRenamed
Declaration
public event Action<string, string, string> OnRenamed
Event Type
| Type | Description |
|---|---|
| Action<string, string, string> |