Class TileGridObjectCollection
A basic grid layout for game objects of a consistent size
Namespace: Microsoft.MixedReality.Toolkit.Utilities
Assembly: cs.temp.dll.dll
Syntax
public class TileGridObjectCollection : MonoBehaviour
Fields
Centered
Will the grid be centered or start in the top corner
Declaration
protected bool Centered
Field Value
Type | Description |
---|---|
Boolean |
Columns
How many columns should the grid have
Declaration
protected int Columns
Field Value
Type | Description |
---|---|
Int32 |
DepthCalculatedBy
The depth or z uses the rows if true or columns if false
Declaration
protected TileGridObjectCollection.GridDivisions DepthCalculatedBy
Field Value
Type | Description |
---|---|
TileGridObjectCollection.GridDivisions |
editorUpdated
Declaration
protected bool editorUpdated
Field Value
Type | Description |
---|---|
Boolean |
Gutters
The space between tiles in pixels
Declaration
protected Vector3 Gutters
Field Value
Type | Description |
---|---|
Vector3 |
LayoutDireciton
The layout direction as a normalized vector
Declaration
protected Vector3 LayoutDireciton
Field Value
Type | Description |
---|---|
Vector3 |
offSet
Declaration
protected Vector3 offSet
Field Value
Type | Description |
---|---|
Vector3 |
OnlyInEditMode
Should this update during run-time
Declaration
protected bool OnlyInEditMode
Field Value
Type | Description |
---|---|
Boolean |
StartPosition
The starting position of the grid - an offset value
Declaration
protected Vector3 StartPosition
Field Value
Type | Description |
---|---|
Vector3 |
TileSize
Tile size in pixels
Declaration
protected Vector3 TileSize
Field Value
Type | Description |
---|---|
Vector3 |
Methods
ConfigureGrid(Int32, Vector3, Vector3, Vector3, Vector3, Boolean)
Load the settings of the grid with code
Declaration
public virtual void ConfigureGrid(int columns, Vector3 tileSize, Vector3 gutters, Vector3 layouDirection, Vector3 startPosition, bool centered)
Parameters
Type | Name | Description |
---|---|---|
Int32 | columns | the amount of columns |
Vector3 | tileSize | grid tile size in pixels |
Vector3 | gutters | gutter size in pixels |
Vector3 | layouDirection | normalized vector flow direction |
Vector3 | startPosition | start position offset |
Boolean | centered | center the grid or layout from edge |
GetListPosition(Int32)
Set the item position by index
Declaration
public virtual Vector3 GetListPosition(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index |
Returns
Type | Description |
---|---|
Vector3 |
OnValidate()
Declaration
protected virtual void OnValidate()
Start()
Declaration
protected virtual void Start()
Update()
Declaration
protected virtual void Update()