ComponentExtensions
Available methods
public static T GetCopyOf<T>(this T comp, T other) where T : Componentvar rb = firstGO.GetComponent<Rigidbody>();
secondGO.AddComponent<Rigidbody>().GetCopyOf(rb) as Rigidbody;public static T AddComponent<T>(this GameObject go, T toAdd) where T : Componentvar rb = firstGO.GetComponent<Rigidbody>();
secondGO.AddComponent(rb);Last updated