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