ChensHelpers
Chen.Helpers.UnityHelpers.Extensions
Extensions.DeepCopyComponentsFrom<T>(GameObject, GameObject) Method
Creates a deep copy of components from the source towards another Game Object.
public static System.Collections.Generic.List<T> DeepCopyComponentsFrom<T>(this GameObject targetGameObject, GameObject sourceGameObject)
where T : Component;
Type parameters
Parameters
targetGameObject
UnityEngine.GameObject
The target Game Object where components will be copied to
sourceGameObject
UnityEngine.GameObject
Source where the original components derived from
Returns
System.Collections.Generic.List<T>
List of deep copied components