Click or drag to resize

TransformExtensions Class

Extension methods for Unity's UnityEngine.Transform
Inheritance Hierarchy
SystemObject
  ImmerseSDK.ExtensionsTransformExtensions

Namespace:  ImmerseSDK.Extensions
Assembly:  ImmerseSDK.App (in ImmerseSDK.App.dll) Version: 3.9.0.0 (3.9.0.0)
Syntax
C#
public static class TransformExtensions

The TransformExtensions type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAddOrGetComponentT
Tries to get a component of type T, if none is found, one will be added
Public methodStatic memberCompare
Returns True if they are the same, otherwise false
Public methodStatic memberDeParentChildren(Transform)
Calls SetParent on all children with null
Public methodStatic memberDeParentChildren(Transform, ActionTransform)
Calls SetParent on all children with null
Public methodStatic memberDeParentChildren(Transform, Boolean, ActionTransform)
Calls SetParent on all children with null
Public methodStatic memberForEachChild
Safe foreach loop where you are allowed to set the parent. Normal foreach on a transform does not work.
Public methodStatic memberGetComponentInChildT
Get a component on the named child
Public methodStatic memberGetComponentInChildrenT
Get a component on the named child, and recurse hierarchy
Public methodStatic memberGetComponentInParentRecursiveT(Transform)
Searches for a Component of type T upwards in the transform's hierarchy
Public methodStatic memberGetComponentInParentRecursiveT(Transform, FuncT, Boolean)
Searches for a Component of type T upwards in the transform's hierarchy
Public methodStatic memberGetPath
Gets the string path to the transform using the parent hierarchy
Public methodStatic memberGetTopMostComponentT(Transform)
Traverses the gameObject hierarchy upwards (via parents) to find the topmost instance of the script
Public methodStatic memberGetTopMostComponentT(Transform, FuncT, Boolean)
Traverses the gameObject hierarchy upwards (via parents) to find the topmost instance of the script
Public methodStatic memberInverseTransformRotation
Transform rotation from world to local space
Public methodStatic memberReset(Transform)
Reset position, rotation and scale
Public methodStatic memberReset(Transform, Boolean)
Reset position, rotation and (optionally) scale
Public methodStatic memberSetParent(Transform, Transform, Vector3, Quaternion)
Sets the parent of the transform
Public methodStatic memberSetParent(Transform, Transform, Vector3, Quaternion, Vector3)
Sets the parent of the transform
Public methodStatic memberSetParentAndReset
Sets the parent and resets the transform
Public methodStatic memberTransformRotation
Transform rotation from local to world space
Top
See Also