Class ObjectTypeSet<TType, TEntry, TObject>
Inheritance
object
ObjectTypeSet<TType, TEntry, TObject>
Implements
UnityEngine.ISerializationCallbackReceiver
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Syntax
[Serializable]
public abstract class ObjectTypeSet<TType, TEntry, TObject> : DataSet<TType>, ISerializationCallbackReceiver, IObjectTypeSet<TType, TObject>, IDataSet<TType>, IDataSet where TType : IObjectType<TEntry, TObject> where TEntry : IObjectTypeEntry<TObject> where TObject : 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 |
string |
typeId |
|
Clean()
Declaration
GetEntryCount(string)
Declaration
public int GetEntryCount(string typeId)
Parameters
Type |
Name |
Description |
string |
typeId |
|
Returns
GetObject(string, int)
Declaration
public TObject GetObject(string typeId, int entryIndex)
Parameters
Type |
Name |
Description |
string |
typeId |
|
int |
entryIndex |
|
Returns
GetWeight(string, int)
Declaration
public float GetWeight(string typeId, int entryIndex)
Parameters
Type |
Name |
Description |
string |
typeId |
|
int |
entryIndex |
|
Returns
IsWeightEnabled(string)
Declaration
public bool IsWeightEnabled(string typeId)
Parameters
Type |
Name |
Description |
string |
typeId |
|
Returns
MoveEntry(string, int, int)
Declaration
public void MoveEntry(string typeId, int oldIndex, int newIndex)
Parameters
Type |
Name |
Description |
string |
typeId |
|
int |
oldIndex |
|
int |
newIndex |
|
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> |
|
Implements
UnityEngine.ISerializationCallbackReceiver