Class Manus::Utility::ComponentUtil
ClassList > Manus > Utility > ComponentUtil
Public Static Functions
Type | Name |
---|---|
T | FindOrInstantiateComponent< T > () Find a component of the supplied type in the scene. If no component can be found, a gameobject will be instantiated with the component attached. This attached component will be returned. |
T | GetFindOrInstantiateComponent< T > (GameObject p_GameObject) Tries to find component of the supplied type on the gameobject. If no component can be found, it will try to find or instantiate the component in the scene using the FindOrInstantiateComponent<T> method. |
T | GetOrAddComponent< T > (this GameObject p_GameObject) Find a component of the supplied type attached to the supplied gameobject. If no component can be found, a gameobject will be added to the supplied gameobject. This attached component will be returned. |
Public Static Functions Documentation
function FindOrInstantiateComponent< T >
function GetFindOrInstantiateComponent< T >
static inline T Manus::Utility::ComponentUtil::GetFindOrInstantiateComponent< T > (
GameObject p_GameObject
)
function GetOrAddComponent< T >
static inline T Manus::Utility::ComponentUtil::GetOrAddComponent< T > (
this GameObject p_GameObject
)
The documentation for this class was generated from the following file api/unity-plugin/Scripts/Utility/ComponentUtil.cs