Ui XML Camera - funovus/editor-wiki GitHub Wiki
Table of Contents
- [Ui XML Reference\Camera](#ui-xml-referencecamera)
* [size](#size)
* [position](#position)
* [rotation](#rotation)
* [discardDepth](#discarddepth)
* [cullingMask](#cullingmask)
* [cameraBackgroundColor](#camerabackgroundcolor)
* [autoSize](#autosize)
|
Ui XML Reference\Camera
Render world-space objects on a UI frame using a custom camera. Camera frames require either a size or autoSize to be set.
<!-- This camera frame's camera will be centered on the middle of the map, rotated to face down.
Placing a unit at x = 16, z = 16 will display it in the camera frame. -->
<Camera width="200" height="200" autoSize="true" position="x: 16, y: 1, z: 15" rotation="x: 35, y: 0, z: 0" verticalOffsetInParent="200" />
This XML produces the following UI:
Render world-space objects on a UI frame using a custom camera
Value type: vector2
The size for the camera frame - this is the resolution of the camera frame. This does not impact the width or height of the camera frame. The resolution values are not capped, but excessively high resolutions will consume large amounts of RAM. If autoSize is set to false
and no explicit size is set, the camera frame will have a resolution of 1x1.
<Camera width="200" height="200" size="x: 400, y: 400" position="x: 16, y: 1, z: 15" rotation="x: 35, y: 0, z: 0" />
Value type: vector3
The position for the camera frame's camera. The default position for a new camera frame is {0, 0, 0}.
<Camera width="200" height="200" size="x: 200, y: 200" position="x: 16, y: 1, z: 15" rotation="x: 35, y: 0, z: 0" />
Value type: vector3
The 3D rotation for the camera frame's camera. The default rotation for a new camera frame is {0, 0, 0}.
<Camera width="200" height="200" size="x: 200, y: 200" position="x: 16, y: 1, z: 15" rotation="x: 35, y: 0, z: 0" />
Value type: boolean
Supports data binding
The discard depth status for the camera frame, where true
discards depth and false
does not.
<Camera width="200" height="200" size="x: 200, y: 200" position="x: 16, y: 1, z: 15" rotation="x: 35, y: 0, z: 0" discardDepth="true"/>
Value type: number
Supports data binding
The culling mask for the camera frame. Odd values will remove the terrain, even values will remove everything.
<Camera width="100" height="100" autoSize="true" position="x: 16, y: 1, z: 15" rotation="x: 35, y: 0, z: 0" cullingMask="1" />
Value type: color
The background color for the camera frame. This background color will only color empty space; or anything that isn't filled by terrain or units. If combined with a culling mask, any space that is culled will be filled with this color.
<Camera width="100" height="100" autoSize="true" position="x: 16, y: 6, z: 15" rotation="x: 35, y: 0, z: 0" cameraBackgroundColor="r: 0, g: 1, b: 0.8, a: 1" />
Value type: boolean
Supports data binding
The autoSize status for the camera frame, where true
means the camera frame will autosize and false
means it does not. AutoSize will attempt to match the resolution with the height and width of the camera frame. If autoSize is set to false
and no explicit size is set, the camera frame will have a resolution of 1x1. This attribute cannot be set via an API call.
<Camera width="400" height="400" autoSize="true" position="x: 16, y: 1, z: 15" rotation="x: 35, y: 0, z: 0"/>