Class ObjectTypeSet<TType, TEntry, TObject>
Inheritance
System.Object
ObjectTypeSet<TType, TEntry, TObject>
Implements
ISerializationCallbackReceiver
Syntax
public abstract class ObjectTypeSet<TType, TEntry, TObject> : DataSet<TType>, IObjectTypeSet<TType, TObject>, IDataSet<TType>, IDataSet where TType : IObjectType<TEntry, TObject> where TEntry : IObjectTypeEntry<TObject> where TObject : UnityEngine.Object
Type Parameters
Name |
Description |
TType |
The type of object type.
|
TEntry |
The type of object type's entries.
|
TObject |
The type of object stored in the entry.
|
Methods
AddNewEntry(String)
Declaration
public void AddNewEntry(string typeId)
Parameters
Type |
Name |
Description |
System.String |
typeId |
|
Clean()
Declaration
GetEntryCount(String)
Declaration
public int GetEntryCount(string typeId)
Parameters
Type |
Name |
Description |
System.String |
typeId |
|
Returns
Type |
Description |
System.Int32 |
|
GetObject(String, Int32)
Declaration
public TObject GetObject(string typeId, int entryIndex)
Parameters
Type |
Name |
Description |
System.String |
typeId |
|
System.Int32 |
entryIndex |
|
Returns
GetWeight(String, Int32)
Declaration
public float GetWeight(string typeId, int entryIndex)
Parameters
Type |
Name |
Description |
System.String |
typeId |
|
System.Int32 |
entryIndex |
|
Returns
Type |
Description |
System.Single |
|
IsWeightEnabled(String)
Declaration
public bool IsWeightEnabled(string typeId)
Parameters
Type |
Name |
Description |
System.String |
typeId |
|
Returns
Type |
Description |
System.Boolean |
|
MoveEntry(String, Int32, Int32)
Declaration
public void MoveEntry(string typeId, int oldIndex, int newIndex)
Parameters
Type |
Name |
Description |
System.String |
typeId |
|
System.Int32 |
oldIndex |
|
System.Int32 |
newIndex |
|
RemoveEntry(String, Int32)
Declaration
public void RemoveEntry(string typeId, int entryIndex)
Parameters
Type |
Name |
Description |
System.String |
typeId |
|
System.Int32 |
entryIndex |
|
SetObject(String, Int32, TObject)
Declaration
public void SetObject(string typeId, int entryIndex, TObject obj)
Parameters
Type |
Name |
Description |
System.String |
typeId |
|
System.Int32 |
entryIndex |
|
TObject |
obj |
|
SetWeight(String, Int32, Single)
Declaration
public void SetWeight(string typeId, int entryIndex, float weight)
Parameters
Type |
Name |
Description |
System.String |
typeId |
|
System.Int32 |
entryIndex |
|
System.Single |
weight |
|
SetWeightEnabled(String, Boolean)
Declaration
public void SetWeightEnabled(string typeId, bool enabled)
Parameters
Type |
Name |
Description |
System.String |
typeId |
|
System.Boolean |
enabled |
|
Events
OnEntryRemoved
Declaration
public event Action<string, int, TObject> OnEntryRemoved
Event Type
Type |
Description |
Action<System.String, System.Int32, TObject> |
|
OnEntrySet
Declaration
public event Action<string, int, TObject, TObject> OnEntrySet
Event Type
Type |
Description |
Action<System.String, System.Int32, TObject, TObject> |
|
Implements
ISerializationCallbackReceiver