Class GridObjectCollection
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.
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.Utilities
Assembly: cs.temp.dll.dll
Syntax
public class GridObjectCollection : BaseObjectCollectionFields
HalfCell
Declaration
protected Vector2 HalfCellField Value
| Type | Description | 
|---|---|
| Vector2 | 
Properties
Anchor
Where the grid is anchored relative to local origin
Declaration
public LayoutAnchor Anchor { get; set; }Property Value
| Type | Description | 
|---|---|
| LayoutAnchor | 
AnchorAlongAxis
Whether anchoring occurs along an objects axis or not
Declaration
public bool AnchorAlongAxis { get; set; }Property Value
| Type | Description | 
|---|---|
| Boolean | 
CellHeight
Height of the cell per object in the collection.
Declaration
public float CellHeight { get; set; }Property Value
| Type | Description | 
|---|---|
| Single | 
CellWidth
Width of the cell per object in the collection.
Declaration
public float CellWidth { get; set; }Property Value
| Type | Description | 
|---|---|
| Single | 
ColumnAlignment
How the columns are aligned in the grid
Declaration
public LayoutHorizontalAlignment ColumnAlignment { get; set; }Property Value
| Type | Description | 
|---|---|
| LayoutHorizontalAlignment | 
Columns
Number of columns per row. Can only be assigned when layout type is ColumnsThenRows
Declaration
public int Columns { get; set; }Property Value
| Type | Description | 
|---|---|
| Int32 | 
CylinderMesh
Reference mesh to use for rendering the cylinder layout
Declaration
public Mesh CylinderMesh { get; set; }Property Value
| Type | Description | 
|---|---|
| Mesh | 
Distance
This is the Distance for an offset for the Plane mapping and is ignored for the other mappings.
Declaration
public float Distance { get; set; }Property Value
| Type | Description | 
|---|---|
| Single | 
Height
Total Height of collection
Declaration
public float Height { get; }Property Value
| Type | Description | 
|---|---|
| Single | 
Layout
Specify direction in which children are laid out
Declaration
public LayoutOrder Layout { get; set; }Property Value
| Type | Description | 
|---|---|
| LayoutOrder | 
OrientType
Should the objects in the collection face the origin of the collection
Declaration
public OrientationType OrientType { get; set; }Property Value
| Type | Description | 
|---|---|
| OrientationType | 
RadialRange
This is the radial range for creating a radial fan layout.
Declaration
public float RadialRange { get; set; }Property Value
| Type | Description | 
|---|---|
| Single | 
Radius
This is the radius of either the Cylinder or Sphere mapping and is ignored when using the plane mapping.
Declaration
public float Radius { get; set; }Property Value
| Type | Description | 
|---|---|
| Single | 
RowAlignment
How the rows are aligned in the grid
Declaration
public LayoutVerticalAlignment RowAlignment { get; set; }Property Value
| Type | Description | 
|---|---|
| LayoutVerticalAlignment | 
Rows
Number of rows per column. Can only be assigned when layout type is RowsThenColumns
Declaration
public int Rows { get; set; }Property Value
| Type | Description | 
|---|---|
| Int32 | 
SphereMesh
Reference mesh to use for rendering the sphere layout
Declaration
public Mesh SphereMesh { get; set; }Property Value
| Type | Description | 
|---|---|
| Mesh | 
SurfaceType
Type of surface to map the collection to.
Declaration
public ObjectOrientationSurfaceType SurfaceType { get; set; }Property Value
| Type | Description | 
|---|---|
| ObjectOrientationSurfaceType | 
Width
Total Width of collection
Declaration
public float Width { get; }Property Value
| Type | Description | 
|---|---|
| Single | 
Methods
LayoutChildren()
Overriding base function for laying out all the children when UpdateCollection is called.
Declaration
protected override void LayoutChildren()Overrides
OnDrawGizmosSelected()
Declaration
protected virtual void OnDrawGizmosSelected()ResolveGridLayout(Vector3[], LayoutOrder)
Declaration
protected void ResolveGridLayout(Vector3[] grid, LayoutOrder order)Parameters
| Type | Name | Description | 
|---|---|---|
| Vector3[] | grid | |
| LayoutOrder | order | 
UpdateNodeFacing(ObjectCollectionNode)
Update the facing of a node given the nodes new position for facing origin with node and orientation type
Declaration
protected void UpdateNodeFacing(ObjectCollectionNode node)Parameters
| Type | Name | Description | 
|---|---|---|
| ObjectCollectionNode | node |