Nov13

C# Snippet: Create Deep-Copy method for Class

This C# Snippets generates the code for a method which deep-copies any class  from a source to a target instance. This is useful to copy components field-wise (and, optionally, property-wise) in Unity 3D. A test for the Transform component is included.

Get it here as a Gist:

https://gist.github.com/1361488