Loading...
Searching...
No Matches
PixelCrushers.ScriptableObjectUtility Class Reference

Utility functions for creating ScriptableObjects. More...

Static Public Member Functions

static T CreateScriptableObject< T > ()
 Create a ScriptableObject of type T, calling the method Initialize() if present.
 
static ScriptableObject CreateScriptableObject (Type type)
 Create a ScriptableObject of a specified type, calling Initialize() if present.
 
static void InitializeScriptableObject (ScriptableObject scriptableObject)
 Calls Initialize() on a ScriptableObject if present.
 
static List< T > CloneList< T > (List< T > original, UnityEngine.Object source=null)
 Makes a deep copy of a ScriptableObject list by instantiating copies of the list elements.
 

Detailed Description

Utility functions for creating ScriptableObjects.

Member Function Documentation

◆ CloneList< T >()

static List< T > PixelCrushers.ScriptableObjectUtility.CloneList< T > ( List< T >  original,
UnityEngine::Object  source = null 
)
inlinestatic

Makes a deep copy of a ScriptableObject list by instantiating copies of the list elements.

Parameters
originalList to clone.
sourceOptional reference to source object to report in log if operation fails.
Returns
A second list containing new instances of the list elements.
Type Constraints
T :ScriptableObject 

◆ CreateScriptableObject()

static ScriptableObject PixelCrushers.ScriptableObjectUtility.CreateScriptableObject ( Type  type)
inlinestatic

Create a ScriptableObject of a specified type, calling Initialize() if present.

Parameters
typeThe ScriptableObject type.
Returns
The new ScriptableObject.

◆ CreateScriptableObject< T >()

Create a ScriptableObject of type T, calling the method Initialize() if present.

Template Parameters
TThe ScriptableObject type.
Returns
The new ScriptableObject.
Type Constraints
T :ScriptableObject 

◆ InitializeScriptableObject()

static void PixelCrushers.ScriptableObjectUtility.InitializeScriptableObject ( ScriptableObject  scriptableObject)
inlinestatic

Calls Initialize() on a ScriptableObject if present.

Parameters
scriptableObjectThe ScriptableObject to initialize.

The documentation for this class was generated from the following file: