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

NameDescription
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: https://issuetracker.unity3d.com/issues/getcomponentinparent-is-returning-null-when-the-gameobject-is-a-prefab

See Also

Reference

UltimateXR.Extensions.Unity Namespace