GameObjectExtensions.CopyComponent_UNSAFE<T>
Extension Method in GameObjectExtensions
Declaration
public static T CopyComponent_UNSAFE<T>(this GameObject gameObject, T component)
where T : ComponentDescription
Copies a component from one game object to another with the exact same values.
Type Parameters
| T | The type of component to copy. |
Parameters
| gameObject | The game object to copy the component to. |
| component | The component to copy. |
Returns
| T | The copied component. |