Helper Scripts Collection 1.3.1
API documentation for the helper scripts compatible with Unity3D
Static Public Member Functions | List of all members
NikosAssets.Helpers.Extensions.ObjectUtils Class Reference

A general UnityEngine.UnityEngine.Object extension helper class More...

Static Public Member Functions

static T CloneSerializable< T > (this T source)
 Perform a deep Copy of the object. Binary Serialization is used to perform the copy More...
 
static T CloneScriptableObject< T > (this T scriptableObject)
 Creates and returns a clone of any given scriptable object. More...
 

Detailed Description

A general UnityEngine.UnityEngine.Object extension helper class

Member Function Documentation

◆ CloneScriptableObject< T >()

static T NikosAssets.Helpers.Extensions.ObjectUtils.CloneScriptableObject< T > ( this T  scriptableObject)
static

Creates and returns a clone of any given scriptable object.

Type Constraints
T :ScriptableObject 

◆ CloneSerializable< T >()

static T NikosAssets.Helpers.Extensions.ObjectUtils.CloneSerializable< T > ( this T  source)
static

Perform a deep Copy of the object. Binary Serialization is used to perform the copy

Reference Article http://www.codeproject.com/KB/tips/SerializedObjectCloner.aspx Very Expensive!!

Template Parameters
TThe type of object being copied
Parameters
sourceThe object instance to copy
Returns
The copied object