Class ObjectTypeSetScriptableObject<TType, TEntry, TObject>
Object type set stored as a scriptable object.
Inheritance
object
UnityEngine.Object
UnityEngine.ScriptableObject
DataSetScriptableObject<TType, OpenObjectTypeSet<TType, TEntry, TObject>>
ObjectTypeSetScriptableObject<TType, TEntry, TObject>
Inherited Members
UnityEngine.ScriptableObject.SetDirty()
UnityEngine.ScriptableObject.CreateInstance(string)
UnityEngine.ScriptableObject.CreateInstance(System.Type)
UnityEngine.ScriptableObject.CreateInstance<T>()
UnityEngine.Object.GetInstanceID()
UnityEngine.Object.GetHashCode()
UnityEngine.Object.Equals(object)
UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion)
UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion, UnityEngine.Transform)
UnityEngine.Object.Instantiate(UnityEngine.Object)
UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Transform)
UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Transform, bool)
UnityEngine.Object.Instantiate<T>(T)
UnityEngine.Object.Instantiate<T>(T, UnityEngine.Vector3, UnityEngine.Quaternion)
UnityEngine.Object.Instantiate<T>(T, UnityEngine.Vector3, UnityEngine.Quaternion, UnityEngine.Transform)
UnityEngine.Object.Instantiate<T>(T, UnityEngine.Transform)
UnityEngine.Object.Instantiate<T>(T, UnityEngine.Transform, bool)
UnityEngine.Object.Destroy(UnityEngine.Object, float)
UnityEngine.Object.Destroy(UnityEngine.Object)
UnityEngine.Object.DestroyImmediate(UnityEngine.Object, bool)
UnityEngine.Object.DestroyImmediate(UnityEngine.Object)
UnityEngine.Object.FindObjectsOfType(System.Type)
UnityEngine.Object.DontDestroyOnLoad(UnityEngine.Object)
UnityEngine.Object.DestroyObject(UnityEngine.Object, float)
UnityEngine.Object.DestroyObject(UnityEngine.Object)
UnityEngine.Object.FindSceneObjectsOfType(System.Type)
UnityEngine.Object.FindObjectsOfTypeIncludingAssets(System.Type)
UnityEngine.Object.FindObjectsOfType<T>()
UnityEngine.Object.FindObjectOfType<T>()
UnityEngine.Object.FindObjectsOfTypeAll(System.Type)
UnityEngine.Object.FindObjectOfType(System.Type)
UnityEngine.Object.ToString()
UnityEngine.Object.name
UnityEngine.Object.hideFlags
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: InsaneScatterbrain.MapGraph
Syntax
[Serializable]
public abstract class ObjectTypeSetScriptableObject<TType, TEntry, TObject> : DataSetScriptableObject<TType, OpenObjectTypeSet<TType, TEntry, TObject>>, IVersioned, IObjectTypeSet<TType, TObject>, IDataSet<TType>, IDataSet, IPreparable where TType : IObjectType<TEntry, TObject> where TEntry : IObjectTypeEntry<TObject> where TObject : Object
Type Parameters
Name | Description |
---|---|
TType | The type of the object type. |
TEntry | The type of the entries. |
TObject | The type of the object in the entries. |
Methods
AddNewEntry(string)
Declaration
public void AddNewEntry(string typeId)
Parameters
Type | Name | Description |
---|---|---|
string | typeId |
Clean()
Declaration
public void Clean()
GetEntryCount(string)
Declaration
public int GetEntryCount(string typeId)
Parameters
Type | Name | Description |
---|---|---|
string | typeId |
Returns
Type | Description |
---|---|
int |
GetObject(string, int)
Declaration
public TObject GetObject(string typeId, int entryIndex)
Parameters
Type | Name | Description |
---|---|---|
string | typeId | |
int | entryIndex |
Returns
Type | Description |
---|---|
TObject |
GetRandomEntry(string, Random)
Gets a random entry of the given type.
Declaration
protected TEntry GetRandomEntry(string typeName, Random random)
Parameters
Type | Name | Description |
---|---|---|
string | typeName | The type's name. |
System.Random | random | The random instance used. |
Returns
Type | Description |
---|---|
TEntry | A random entry. |
GetRandomObject(string, Random)
Gets the object for a random entry of the given type.
Declaration
public TObject GetRandomObject(string typeName, Random random)
Parameters
Type | Name | Description |
---|---|---|
string | typeName | The type's name. |
System.Random | random | The random instance used. |
Returns
Type | Description |
---|---|
TObject | A random object. |
GetWeight(string, int)
Declaration
public float GetWeight(string typeId, int entryIndex)
Parameters
Type | Name | Description |
---|---|---|
string | typeId | |
int | entryIndex |
Returns
Type | Description |
---|---|
float |
IsWeightEnabled(string)
Declaration
public bool IsWeightEnabled(string typeId)
Parameters
Type | Name | Description |
---|---|---|
string | typeId |
Returns
Type | Description |
---|---|
bool |
MoveEntry(string, int, int)
Declaration
public void MoveEntry(string typeId, int oldIndex, int newIndex)
Parameters
Type | Name | Description |
---|---|---|
string | typeId | |
int | oldIndex | |
int | newIndex |
Prepare()
Declaration
public virtual void Prepare()
RemoveEntry(string, int)
Declaration
public void RemoveEntry(string typeId, int entryIndex)
Parameters
Type | Name | Description |
---|---|---|
string | typeId | |
int | entryIndex |
SetObject(string, int, TObject)
Declaration
public void SetObject(string typeId, int entryIndex, TObject obj)
Parameters
Type | Name | Description |
---|---|---|
string | typeId | |
int | entryIndex | |
TObject | obj |
SetWeight(string, int, float)
Declaration
public void SetWeight(string typeId, int entryIndex, float weight)
Parameters
Type | Name | Description |
---|---|---|
string | typeId | |
int | entryIndex | |
float | weight |
SetWeightEnabled(string, bool)
Declaration
public void SetWeightEnabled(string typeId, bool enabled)
Parameters
Type | Name | Description |
---|---|---|
string | typeId | |
bool | enabled |
Events
OnEntryRemoved
Declaration
public event Action<string, int, TObject> OnEntryRemoved
Event Type
Type | Description |
---|---|
System.Action<T1, T2, T3><string, int, TObject> |
OnEntrySet
Declaration
public event Action<string, int, TObject, TObject> OnEntrySet
Event Type
Type | Description |
---|---|
System.Action<T1, T2, T3, T4><string, int, TObject, TObject> |