Method ClonePrefabWithHideFlags
ClonePrefabWithHideFlags(GameObject, Transform)
Clones the Prefab Game Object prefab
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 ClonePrefabWithHideFlags(GameObject prefab, Transform parent = null)
Parameters
Type | Name | Description |
---|---|---|
GameObject | prefab | The Prefab 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 |