C# Class UnityForge.GameObjectExtensions

显示文件 Open project: rfadeev/unity-forge-extension-methods

Public Methods

Method Description
AddChild ( GameObject gameObject, GameObject childGameObject ) : void
AddChild ( GameObject gameObject, GameObject childGameObject, bool worldPositionStays ) : void
AddChild ( GameObject gameObject, Transform childTransform ) : void
AddChild ( GameObject gameObject, Transform childTransform, bool worldPositionStays ) : void
DestroyChildren ( GameObject gameObject ) : void
SetLayerRecursively ( GameObject gameObject, int layer ) : void

Set the layer for game object and all its childs recursively.

SetTagRecursively ( GameObject gameObject, string tag ) : void

Set the tag for game object and all its childs recursively.

Method Details

AddChild() public static method

public static AddChild ( GameObject gameObject, GameObject childGameObject ) : void
gameObject GameObject
childGameObject GameObject
return void

AddChild() public static method

public static AddChild ( GameObject gameObject, GameObject childGameObject, bool worldPositionStays ) : void
gameObject GameObject
childGameObject GameObject
worldPositionStays bool
return void

AddChild() public static method

public static AddChild ( GameObject gameObject, Transform childTransform ) : void
gameObject GameObject
childTransform Transform
return void

AddChild() public static method

public static AddChild ( GameObject gameObject, Transform childTransform, bool worldPositionStays ) : void
gameObject GameObject
childTransform Transform
worldPositionStays bool
return void

DestroyChildren() public static method

public static DestroyChildren ( GameObject gameObject ) : void
gameObject GameObject
return void

SetLayerRecursively() public static method

Set the layer for game object and all its childs recursively.
public static SetLayerRecursively ( GameObject gameObject, int layer ) : void
gameObject GameObject
layer int The layer for game objects.
return void

SetTagRecursively() public static method

Set the tag for game object and all its childs recursively.
public static SetTagRecursively ( GameObject gameObject, string tag ) : void
gameObject GameObject
tag string The tag for game objects.
return void