Megadocs 0.0.1
All of megapop's internal libraries
Megapop.MegaCore.GameObjectExt Class Reference

Static Public Member Functions

static GameObject DuplicateGameObject (this GameObject source, Transform newParent, bool keepPrefabReference=false)
 Duplicates a GameObject More...
 
static void StripComponents (this GameObject go, params Type[] toKeep)
 
static void SetLayerRecursively (this GameObject go, string layer)
 
static void SetLayerRecursively (this GameObject go, int layer)
 
static T GetOrAddComponent< T > (this GameObject go)
 

Member Function Documentation

◆ DuplicateGameObject()

static GameObject Megapop.MegaCore.GameObjectExt.DuplicateGameObject ( this GameObject  source,
Transform  newParent,
bool  keepPrefabReference = false 
)
inlinestatic

Duplicates a GameObject

Returns
the component from the cloned GameObject

◆ GetOrAddComponent< T >()

static T Megapop.MegaCore.GameObjectExt.GetOrAddComponent< T > ( this GameObject  go)
inlinestatic
Type Constraints
T :Component 

◆ SetLayerRecursively() [1/2]

static void Megapop.MegaCore.GameObjectExt.SetLayerRecursively ( this GameObject  go,
int  layer 
)
inlinestatic

◆ SetLayerRecursively() [2/2]

static void Megapop.MegaCore.GameObjectExt.SetLayerRecursively ( this GameObject  go,
string  layer 
)
inlinestatic

◆ StripComponents()

static void Megapop.MegaCore.GameObjectExt.StripComponents ( this GameObject  go,
params Type[]  toKeep 
)
inlinestatic

The documentation for this class was generated from the following file: