using System; using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; using System.Text; namespace BansheeEngine { /// /// Provides utility methods dealing with object serialization. /// public static class SerializableUtility { /// /// Clones the specified object. Non-serializable types and fields are ignored in clone. A deep copy is performed /// on all serializable elements except for resources or game objects. /// /// Non-null reference to the object to clone. Object type must be serializable. /// Deep copy of the original object. public static object Clone(object original) { return Internal_Clone(original); } [MethodImpl(MethodImplOptions.InternalCall)] private static extern object Internal_Clone(object original); } }