NGUI: Next-Gen UI kit  3.7.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
UIAnchor Class Reference

This script can be used to anchor an object to the side or corner of the screen, panel, or a widget. More...

Inheritance diagram for UIAnchor:

Public Types

enum  Side {
  Side.BottomLeft, Side.Left, Side.TopLeft, Side.Top,
  Side.TopRight, Side.Right, Side.BottomRight, Side.Bottom,
  Side.Center
}
 

Public Attributes

Camera uiCamera = null
 Camera used to determine the anchor bounds. Set automatically if none was specified. More...
 
GameObject container = null
 Object used to determine the container's bounds. Overwrites the camera-based anchoring if the value was specified. More...
 
Side side = Side.Center
 Side or corner to anchor to. More...
 
bool runOnlyOnce = true
 If set to 'true', UIAnchor will execute once, then will be disabled. Screen size changes will still cause the anchor to update itself, even if it's disabled. More...
 
Vector2 relativeOffset = Vector2.zero
 Relative offset value, if any. For example "0.25" with 'side' set to Left, means 25% from the left side. More...
 
Vector2 pixelOffset = Vector2.zero
 Pixel offset value if any. For example "10" in x will move the widget 10 pixels to the right while "-10" in x is 10 pixels to the left based on the pixel values set in UIRoot. More...
 

Detailed Description

This script can be used to anchor an object to the side or corner of the screen, panel, or a widget.

Member Enumeration Documentation

Enumerator
BottomLeft 
Left 
TopLeft 
Top 
TopRight 
Right 
BottomRight 
Bottom 
Center 

Member Data Documentation

GameObject UIAnchor.container = null

Object used to determine the container's bounds. Overwrites the camera-based anchoring if the value was specified.

Vector2 UIAnchor.pixelOffset = Vector2.zero

Pixel offset value if any. For example "10" in x will move the widget 10 pixels to the right while "-10" in x is 10 pixels to the left based on the pixel values set in UIRoot.

Vector2 UIAnchor.relativeOffset = Vector2.zero

Relative offset value, if any. For example "0.25" with 'side' set to Left, means 25% from the left side.

bool UIAnchor.runOnlyOnce = true

If set to 'true', UIAnchor will execute once, then will be disabled. Screen size changes will still cause the anchor to update itself, even if it's disabled.

Side UIAnchor.side = Side.Center

Side or corner to anchor to.

Camera UIAnchor.uiCamera = null

Camera used to determine the anchor bounds. Set automatically if none was specified.


The documentation for this class was generated from the following file: