ComponentExt ClassComponent extensions.
Inheritance Hierarchy
System.Object
UltimateXR.Extensions.Unity.ComponentExt
Namespace: UltimateXR.Extensions.Unity
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0
Syntax
C#
public static class ComponentExt
The ComponentExt type exposes the following members.
Methods
Name | Description | |
---|---|---|
GetAllComponentsInOpenScenes<T> | Gets a list of all components of the given type in the open scenes | |
GetCommonRootComponentFromSet<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. | |
GetOrAddComponent<T> | Gets the Component of a given type. If it doesn’t exist, it is added to the GameObject. | |
GetPathUnderScene | Gets the full path under current scene, including all parents, but scene name, for the given component. | |
GetSceneUid | Gets an unique identifier string for the given component. | |
GetUniqueScenePath | Gets an unique path in the scene for the given component. It will include scene name, sibling and component indices to make it unique. | |
SafeGetComponentInParent<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: https://issuetracker.unity3d.com/issues/getcomponentinparent-is-returning-null-when-the-gameobject-is-a-prefab |