Class BaseObjectCollection
Namespace: Microsoft.MixedReality.Toolkit.Utilities
Assembly: cs.temp.dll.dll
Syntax
public abstract class BaseObjectCollection : MonoBehaviour
Properties
IgnoreInactiveTransforms
Whether to include space for inactive transforms in the layout
Declaration
public bool IgnoreInactiveTransforms { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
NodeList
List of objects with generated data on the object.
Declaration
protected List<ObjectCollectionNode> NodeList { get; }
Property Value
Type | Description |
---|---|
List<ObjectCollectionNode> |
NodeListReadOnly
Read only list of objects with generated data on the object.
Declaration
public IReadOnlyList<ObjectCollectionNode> NodeListReadOnly { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<ObjectCollectionNode> |
OnCollectionUpdated
Action called when collection is updated
Declaration
public Action<BaseObjectCollection> OnCollectionUpdated { get; set; }
Property Value
Type | Description |
---|---|
Action<BaseObjectCollection> |
SortType
Type of sorting to use.
Declaration
public CollationOrder SortType { get; set; }
Property Value
Type | Description |
---|---|
CollationOrder |
Methods
ContainsNode(Transform)
Check if a node exists in the NodeList.
Declaration
protected bool ContainsNode(Transform node)
Parameters
Type | Name | Description |
---|---|---|
Transform | node | The Transform belonging to the ObjectCollectionNode |
Returns
Type | Description |
---|---|
Boolean | true when |
ContainsNode(Transform, out Int32)
Check if a node exists in the NodeList.
Declaration
public bool ContainsNode(Transform node, out int nodeIndex)
Parameters
Type | Name | Description |
---|---|---|
Transform | node | The Transform belonging to ObjectCollectionNode |
Int32 | nodeIndex | The index of the element in NodeList |
Returns
Type | Description |
---|---|
Boolean | true when |
LayoutChildren()
Implement for laying out all children when UpdateCollection is called.
Declaration
protected abstract void LayoutChildren()
PruneEmptyNodes()
Checks for empty nodes and removes them
Declaration
protected void PruneEmptyNodes()
SortNodes()
Sorts NodeList based on SortType
Declaration
protected void SortNodes()
UpdateCollection()
Rebuilds / updates the collection layout. Update collection is called from the editor button on the inspector.
Declaration
public virtual void UpdateCollection()