|
static AudioSource | PlaySound (AudioClip clip) |
| Play the specified audio clip. More...
|
|
static AudioSource | PlaySound (AudioClip clip, float volume) |
| Play the specified audio clip with the specified volume. More...
|
|
static AudioSource | PlaySound (AudioClip clip, float volume, float pitch) |
| Play the specified audio clip with the specified volume and pitch. More...
|
|
static int | RandomRange (int min, int max) |
| New WWW call can fail if the crossdomain policy doesn't check out. Exceptions suck. It's much more elegant to check for null instead. More...
|
|
static string | GetHierarchy (GameObject obj) |
| Returns the hierarchy of the object in a human-readable format. More...
|
|
static T[] | FindActive< T > () |
| Find all active objects of specified type. More...
|
|
static Camera | FindCameraForLayer (int layer) |
| Find the camera responsible for drawing the objects on the specified layer. More...
|
|
static void | AddWidgetCollider (GameObject go) |
| Add a collider to the game object containing one or more widgets. More...
|
|
static void | AddWidgetCollider (GameObject go, bool considerInactive) |
| Add a collider to the game object containing one or more widgets. More...
|
|
static void | UpdateWidgetCollider (GameObject go) |
| Adjust the widget's collider based on the depth of the widgets, as well as the widget's dimensions. More...
|
|
static void | UpdateWidgetCollider (GameObject go, bool considerInactive) |
| Adjust the widget's collider based on the depth of the widgets, as well as the widget's dimensions. More...
|
|
static void | UpdateWidgetCollider (BoxCollider box, bool considerInactive) |
| Adjust the widget's collider based on the depth of the widgets, as well as the widget's dimensions. More...
|
|
static void | UpdateWidgetCollider (BoxCollider2D box, bool considerInactive) |
| Adjust the widget's collider based on the depth of the widgets, as well as the widget's dimensions. More...
|
|
static string | GetTypeName< T > () |
| Helper function that returns the string name of the type. More...
|
|
static string | GetTypeName (UnityEngine.Object obj) |
| Helper function that returns the string name of the type. More...
|
|
static void | RegisterUndo (UnityEngine.Object obj, string name) |
| Convenience method that works without warnings in both Unity 3 and 4. More...
|
|
static void | SetDirty (UnityEngine.Object obj) |
| Convenience function that marks the specified object as dirty in the Unity Editor. More...
|
|
static GameObject | AddChild (GameObject parent) |
| Add a new child game object. More...
|
|
static GameObject | AddChild (GameObject parent, bool undo) |
| Add a new child game object. More...
|
|
static GameObject | AddChild (GameObject parent, GameObject prefab) |
| Instantiate an object and add it to the specified parent. More...
|
|
static int | CalculateRaycastDepth (GameObject go) |
| Calculate the game object's depth based on the widgets within, and also taking panel depth into consideration. More...
|
|
static int | CalculateNextDepth (GameObject go) |
| Gathers all widgets and calculates the depth for the next widget. More...
|
|
static int | CalculateNextDepth (GameObject go, bool ignoreChildrenWithColliders) |
| Gathers all widgets and calculates the depth for the next widget. More...
|
|
static int | AdjustDepth (GameObject go, int adjustment) |
| Adjust the widgets' depth by the specified value. Returns '0' if nothing was adjusted, '1' if panels were adjusted, and '2' if widgets were adjusted. More...
|
|
static void | BringForward (GameObject go) |
| Bring all of the widgets on the specified object forward. More...
|
|
static void | PushBack (GameObject go) |
| Push all of the widgets on the specified object back, making them appear behind everything else. More...
|
|
static void | NormalizeDepths () |
| Normalize the depths of all the widgets and panels in the scene, making them start from 0 and remain in order. More...
|
|
static void | NormalizeWidgetDepths () |
| Normalize the depths of all the widgets in the scene, making them start from 0 and remain in order. More...
|
|
static void | NormalizeWidgetDepths (GameObject go) |
| Normalize the depths of all the widgets in the scene, making them start from 0 and remain in order. More...
|
|
static void | NormalizeWidgetDepths (UIWidget[] list) |
| Normalize the depths of all the widgets in the scene, making them start from 0 and remain in order. More...
|
|
static void | NormalizePanelDepths () |
| Normalize the depths of all the panels in the scene, making them start from 0 and remain in order. More...
|
|
static UIPanel | CreateUI (bool advanced3D) |
| Create a new UI. More...
|
|
static UIPanel | CreateUI (bool advanced3D, int layer) |
| Create a new UI. More...
|
|
static UIPanel | CreateUI (Transform trans, bool advanced3D, int layer) |
| Create a new UI. More...
|
|
static void | SetChildLayer (Transform t, int layer) |
| Helper function that recursively sets all children with widgets' game objects layers to the specified value. More...
|
|
static T | AddChild< T > (GameObject parent) |
| Add a child object to the specified parent and attaches the specified script to it. More...
|
|
static T | AddChild< T > (GameObject parent, bool undo) |
| Add a child object to the specified parent and attaches the specified script to it. More...
|
|
static T | AddWidget< T > (GameObject go) |
| Add a new widget of specified type. More...
|
|
static UISprite | AddSprite (GameObject go, UIAtlas atlas, string spriteName) |
| Add a sprite appropriate for the specified atlas sprite. It will be sliced if the sprite has an inner rect, and a regular sprite otherwise. More...
|
|
static GameObject | GetRoot (GameObject go) |
| Get the rootmost object of the specified game object. More...
|
|
static T | FindInParents< T > (GameObject go) |
| Finds the specified component on the game object or one of its parents. More...
|
|
static T | FindInParents< T > (Transform trans) |
| Finds the specified component on the game object or one of its parents. More...
|
|
static void | Destroy (UnityEngine.Object obj) |
| Destroy the specified object, immediately if in edit mode. More...
|
|
static void | DestroyImmediate (UnityEngine.Object obj) |
| Destroy the specified object immediately, unless not in the editor, in which case the regular Destroy is used instead. More...
|
|
static void | Broadcast (string funcName) |
| Call the specified function on all objects in the scene. More...
|
|
static void | Broadcast (string funcName, object param) |
| Call the specified function on all objects in the scene. More...
|
|
static bool | IsChild (Transform parent, Transform child) |
| Determines whether the 'parent' contains a 'child' in its hierarchy. More...
|
|
static void | SetActive (GameObject go, bool state) |
| SetActiveRecursively enables children before parents. This is a problem when a widget gets re-enabled and it tries to find a panel on its parent. More...
|
|
static void | SetActive (GameObject go, bool state, bool compatibilityMode) |
| SetActiveRecursively enables children before parents. This is a problem when a widget gets re-enabled and it tries to find a panel on its parent. More...
|
|
static void | SetActiveChildren (GameObject go, bool state) |
| Activate or deactivate children of the specified game object without changing the active state of the object itself. More...
|
|
static bool | IsActive (Behaviour mb) |
| Helper function that returns whether the specified MonoBehaviour is active. More...
|
|
static bool | GetActive (Behaviour mb) |
| Helper function that returns whether the specified MonoBehaviour is active. More...
|
|
static bool | GetActive (GameObject go) |
| Unity4 has changed GameObject.active to GameObject.activeself. More...
|
|
static void | SetActiveSelf (GameObject go, bool state) |
| Unity4 has changed GameObject.active to GameObject.SetActive. More...
|
|
static void | SetLayer (GameObject go, int layer) |
| Recursively set the game object's layer. More...
|
|
static Vector3 | Round (Vector3 v) |
| Helper function used to make the vector use integer numbers. More...
|
|
static void | MakePixelPerfect (Transform t) |
| Make the specified selection pixel-perfect. More...
|
|
static bool | Save (string fileName, byte[] bytes) |
| Save the specified binary data into the specified file. More...
|
|
static byte[] | Load (string fileName) |
| Load all binary data from the specified file. More...
|
|
static Color | ApplyPMA (Color c) |
| Pre-multiply shaders result in a black outline if this operation is done in the shader. It's better to do it outside. More...
|
|
static void | MarkParentAsChanged (GameObject go) |
| Inform all widgets underneath the specified object that the parent has changed. More...
|
|
static string | EncodeColor (Color c) |
|
static Color | ParseColor (string text, int offset) |
|
static string | StripSymbols (string text) |
|
static T | AddMissingComponent< T > (this GameObject go) |
| Extension for the game object that checks to see if the component already exists before adding a new one. If the component is already present it will be returned instead. More...
|
|
static Vector3[] | GetSides (this Camera cam) |
| Get sides relative to the specified camera. The order is left, top, right, bottom. More...
|
|
static Vector3[] | GetSides (this Camera cam, float depth) |
| Get sides relative to the specified camera. The order is left, top, right, bottom. More...
|
|
static Vector3[] | GetSides (this Camera cam, Transform relativeTo) |
| Get sides relative to the specified camera. The order is left, top, right, bottom. More...
|
|
static Vector3[] | GetSides (this Camera cam, float depth, Transform relativeTo) |
| Get sides relative to the specified camera. The order is left, top, right, bottom. More...
|
|
static Vector3[] | GetWorldCorners (this Camera cam) |
| Get the camera's world-space corners. The order is bottom-left, top-left, top-right, bottom-right. More...
|
|
static Vector3[] | GetWorldCorners (this Camera cam, float depth) |
| Get the camera's world-space corners. The order is bottom-left, top-left, top-right, bottom-right. More...
|
|
static Vector3[] | GetWorldCorners (this Camera cam, Transform relativeTo) |
| Get the camera's world-space corners. The order is bottom-left, top-left, top-right, bottom-right. More...
|
|
static Vector3[] | GetWorldCorners (this Camera cam, float depth, Transform relativeTo) |
| Get the camera's world-space corners. The order is bottom-left, top-left, top-right, bottom-right. More...
|
|
static string | GetFuncName (object obj, string method) |
| Convenience function that converts Class + Function combo into Class.Function representation. More...
|
|
static void | Execute< T > (GameObject go, string funcName) |
| Execute the specified function on the target game object. More...
|
|
static void | ExecuteAll< T > (GameObject root, string funcName) |
| Execute the specified function on the target game object and all of its children. More...
|
|
static void | ImmediatelyCreateDrawCalls (GameObject root) |
| Immediately start, update, and create all the draw calls from newly instantiated UI. This is useful if you plan on doing something like immediately taking a screenshot then destroying the UI. More...
|
|