class MAGES::WorldSpaceCanvas¶
Overview¶
A component which creates a canvas that is ready for XR. More…
class WorldSpaceCanvas: public MonoBehaviour { public: // properties Vector3 Position; RectTransform RC; Vector2 Size; Vector2 Pivot; // methods GameObject AddChild(string name = "New UI Item"); };
Detailed Documentation¶
A component which creates a canvas that is ready for XR.
Properties¶
Vector3 Position
Gets or sets the position of the canvas.
RectTransform RC
Gets the RectTransform of the canvas.
Vector2 Size
Gets or sets the size (width, height; not scale) of the canvas.
Vector2 Pivot
Gets or sets the pivot of the canvas.
Methods¶
GameObject AddChild(string name = "New UI Item")
Adds a child to the canvas.
Parameters:
name |
Optional name of the child game object. |
Returns:
The new child gameobject.