ComponentExt ClassComponent extensions.

Inheritance Hierarchy

Namespace: UltimateXR.Extensions.Unity
Assembly: UltimateXR (in UltimateXR.dll) Version:



public static class ComponentExt

The ComponentExt type exposes the following members.


Public methodStatic memberGetAllComponentsInOpenScenes<T> Gets a list of all components of the given type in the open scenes
Public methodStatic memberGetCommonRootComponentFromSet<T> From a set of components, returns which one of them has a transform that is a common root of all. The transform must be the transform of a component in the list.
Public methodStatic memberGetOrAddComponent<T> Gets the Component of a given type. If it doesn’t exist, it is added to the GameObject.
Public methodStatic memberGetPathUnderScene Gets the full path under current scene, including all parents, but scene name, for the given component.
Public methodStatic memberGetSceneUid Gets an unique identifier string for the given component.
Public methodStatic memberGetUniqueScenePath Gets an unique path in the scene for the given component. It will include scene name, sibling and component indices to make it unique.
Public methodStatic memberSafeGetComponentInParent<T> Gets the Component of a given type in the GameObject or any of its parents. It also works on prefabs, where regular GetComponentInParent(Type, Boolean) will not work:

See Also


UltimateXR.Extensions.Unity Namespace