API reference
API reference
Select your platform
No SDKs available
No versions available

TransformExtensions Class

A collection of utility functions expanding the functionality of Unity's built-in Transform type.

Static Member Functions

Transforms a 3D position from world space to local space, ignoring scaling.
This is useful for specialized operations which manipulate scale while performing calculations which would otherwise be affected by scale; for example usage, see the PanelwithManipulators sample.
Transforms a 3D position from local space to world space, ignoring scaling.
This is useful for specialized operations which manipulate scale while performing calculations which would otherwise be affected by scale; for example usage, see the PanelwithManipulators sample.
Transforms a bounding box from local to world space.
Parameters
transform
Transfrom that bounds is local to.
bounds
The bounds to transform, in local space.
Returns
The bounding box in world space.
Walks the hierarchy beneath parent searching for a Transform whose GameObject is named name .
This is a convience method equivalent to calling FindChildRecursive(Transform, Predicate<Transform>) with a predicate that simply checks the name.
Parameters
parent
The Transform which will serve as the root of the search.
name
The name for which to search.
Returns
The first child found with the requested name. If more than one candidate meets the requirement, there is no guarantee which of them will be returned. If there are no candidates, returns null.
Walks the hierarchy beneath parent searching for a Transform for which predicate succeeds.
Parameters
parent
The Transform which will serve as the root of the search.
predicate
The predicate for which to search.
Returns
The first child found for which the predicate succeeds. If more than one candidate meets the requirement, there is no guarantee which of them will be returned. If there are no candidates, returns null.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon