Modifier

Partager via


GridObjectCollection Class

Definition

A Grid Object Collection is simply a set of child objects organized with some layout parameters. The collection can be used to quickly create control panels or sets of prefab/objects.

public ref class GridObjectCollection : Microsoft::MixedReality::Toolkit::Utilities::BaseObjectCollection
[UnityEngine.AddComponentMenu("Scripts/MRTK/SDK/GridObjectCollection")]
[UnityEngine.ExecuteAlways]
[UnityEngine.HelpURL("https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/features/ux-building-blocks/object-collection")]
public class GridObjectCollection : Microsoft.MixedReality.Toolkit.Utilities.BaseObjectCollection
[<UnityEngine.AddComponentMenu("Scripts/MRTK/SDK/GridObjectCollection")>]
[<UnityEngine.ExecuteAlways>]
[<UnityEngine.HelpURL("https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/features/ux-building-blocks/object-collection")>]
type GridObjectCollection = class
    inherit BaseObjectCollection
Public Class GridObjectCollection
Inherits BaseObjectCollection
Inheritance
UnityEngine.MonoBehaviour
GridObjectCollection
Derived
Attributes
UnityEngine.AddComponentMenuAttribute UnityEngine.ExecuteAlwaysAttribute UnityEngine.HelpURLAttribute

Constructors

GridObjectCollection()

Fields

HalfCell

Properties

Anchor

Where the grid is anchored relative to local origin

AnchorAlongAxis

Whether anchoring occurs along an objects axis or not

CellHeight

Height of the cell per object in the collection.

CellWidth

Width of the cell per object in the collection.

ColumnAlignment

How the columns are aligned in the grid

Columns

Number of columns per row. Can only be assigned when layout type is ColumnsThenRows

CylinderMesh

Reference mesh to use for rendering the cylinder layout

Distance

This is the Distance for an offset for the Plane mapping and is ignored for the other mappings.

Height

Total Height of collection

IgnoreInactiveTransforms

Whether to include space for inactive transforms in the layout

(Inherited from BaseObjectCollection)
Layout

Specify direction in which children are laid out

NodeList

List of objects with generated data on the object.

(Inherited from BaseObjectCollection)
NodeListReadOnly

Read only list of objects with generated data on the object.

(Inherited from BaseObjectCollection)
OnCollectionUpdated

Action called when collection is updated

(Inherited from BaseObjectCollection)
OrientType

Should the objects in the collection face the origin of the collection

RadialRange

This is the radial range for creating a radial fan layout.

Radius

This is the radius of either the Cylinder or Sphere mapping and is ignored when using the plane mapping.

RowAlignment

How the rows are aligned in the grid

Rows

Number of rows per column. Can only be assigned when layout type is RowsThenColumns

SortType

Type of sorting to use.

(Inherited from BaseObjectCollection)
SphereMesh

Reference mesh to use for rendering the sphere layout

SurfaceType

Type of surface to map the collection to.

Width

Total Width of collection

Methods

ContainsNode(Transform, Int32)

Check if a node exists in the NodeList.

(Inherited from BaseObjectCollection)
ContainsNode(Transform)

Check if a node exists in the NodeList.

(Inherited from BaseObjectCollection)
LayoutChildren()

Overriding base function for laying out all the children when UpdateCollection is called.

OnDrawGizmosSelected()
PruneEmptyNodes()

Checks for empty nodes and removes them

(Inherited from BaseObjectCollection)
ResolveGridLayout(Vector3[], LayoutOrder)
SortNodes()

Sorts NodeList based on SortType

(Inherited from BaseObjectCollection)
UpdateCollection()

Rebuilds / updates the collection layout. Update collection is called from the editor button on the inspector.

(Inherited from BaseObjectCollection)
UpdateNodeFacing(ObjectCollectionNode)

Update the facing of a node given the nodes new position for facing origin with node and orientation type

Applies to