Method CloneWithHideFlags
CloneWithHideFlags(GameObject, Transform)
Clones the Game Object original
and copies the hide flags of each Game Object
in its hierarchy to the corresponding Game Object in the copy's hierarchy.
Declaration
public static GameObject CloneWithHideFlags(GameObject original, Transform parent = null)
Parameters
Type | Name | Description |
---|---|---|
GameObject | original | The Game Object to make a copy of |
Transform | parent | Optional parent that will be assigned to the clone of the original Game Object |
Returns
Type | Description |
---|---|
GameObject | The clone of the original Game Object |