by Mike Ton 10 years ago
533
More like this
must
0 or 1 param
Unity Object ref
MonoBehaviour
GameObject
string
int
float
return void
public
Allow Activation on Mobile Device
Input Actions Per Second
10
(io)
Button
Cancel
Submit
Axis
FirstSelected
(defaultUI element)
(prop)
Anchor Point
4
relative size
average %
1
single
Rect Transform
Rect Tool (t)
used to move all UI elements
rotate
click out side corners
SHIFT : snaps 15 degrees
drag
Click corners and side to rescale
SHIFT : maintain proportions
different from transform :
(local vs. global)
global bounding box is world aligned
local bounding box is axis aligned
(pivot point)
defaults to center of UI element
(anchor)
(only if world space)
scale
rotation
xyz
Pivot
Anchors
max
min
x & y
size : width & height
position : xyz
Position values are relative to anchor point
z is usually zero
if parent has rect transform, anchor can be a child of that
RenderMode
World Space
when set to world space, Rect Transform becomes available.
You can rotate and position canvas as desired
Screen Space
(Will overrideRect Component)
Rect uneditable in this mode
Camera
(attached to a specific camera)
use camera specific settings; fits to frustrum
UI can be seen in all cameras
Clear depth, background ...etc in cameras you don't want to see UI
perspective camera to give UI feeling of depth
Overlay
(default)
overlays all other element, UI drawn on top of everything
(children)
MUST have 1 available canvas to use UI element. Possible to have multiple canvas per scene.
All UI Elements must be children of a canvas.
UI Element
Image
Fill Center
bool
Type
Filled
Preserve Aspect
Fill
Amount
0 ... 1.0
Origin
Right
Left
Method
Radial
360
180
90
Vertical
Horizontal
Tiled
Sliced
9-Slice
Simple
(dispData)
Material
Color
Source
(render order)
top down
top items rendered firs, lower items rendered on top