Class ObjectType<TEntry, TObject>
Represents objects that consists of entries that represent a certain Object type.
Inheritance
System.Object
ObjectType<TEntry, TObject>
Syntax
public abstract class ObjectType<TEntry, TObject> : DataSetItem, IObjectType<TEntry, TObject>, IDataSetItem where TEntry : IObjectTypeEntry<TObject> where TObject : UnityEngine.Object
Type Parameters
Name |
Description |
TEntry |
The entry type.
|
TObject |
The object type.
|
Constructors
ObjectType(String)
Declaration
protected ObjectType(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Properties
Entries
Declaration
public ReadOnlyCollection<TEntry> Entries { get; }
Property Value
Type |
Description |
ReadOnlyCollection<TEntry> |
|
IsWeightEnabled
Declaration
public bool IsWeightEnabled { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
OpenEntries
A less restricted collection of the entries for protected use.
Declaration
protected abstract List<TEntry> OpenEntries { get; }
Property Value
Type |
Description |
List<TEntry> |
|
TotalWeight
Declaration
public float TotalWeight { get; }
Property Value
Type |
Description |
System.Single |
|
Methods
AddNewEntry()
Declaration
public void AddNewEntry()
CalculateTotalWeight()
Declaration
public void CalculateTotalWeight()
Clean()
Declaration
MoveEntry(Int32, Int32)
Declaration
public void MoveEntry(int oldIndex, int newIndex)
Parameters
Type |
Name |
Description |
System.Int32 |
oldIndex |
|
System.Int32 |
newIndex |
|
NewEntry()
Creates and returns an entry for this object type.
Declaration
protected abstract TEntry NewEntry()
Returns
Type |
Description |
TEntry |
The new entry.
|
RemoveEntry(Int32)
Declaration
public void RemoveEntry(int index)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
Implements