Class ScriptableObjectExtensions
Extensions for ScriptableObjects
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.Editor
Assembly: cs.temp.dll.dll
Syntax
public static class ScriptableObjectExtensions
Methods
CreateAsset(ScriptableObject, String, String)
Creates, saves, and then opens a new asset for the target ScriptableObject.
Declaration
public static ScriptableObject CreateAsset(this ScriptableObject scriptableObject, string path = null, string fileName = null)
Parameters
Type | Name | Description |
---|---|---|
ScriptableObject | scriptableObject | ScriptableObject you want to create an asset file for. |
String | path | Optional path for the new asset. |
String | fileName | Optional filename for the new asset. |
Returns
Type | Description |
---|---|
ScriptableObject |
GetAllInstances(Type)
Gets all the scriptable object instances in the project.
Declaration
public static ScriptableObject[] GetAllInstances(Type assetType)
Parameters
Type | Name | Description |
---|---|---|
Type | assetType | The Type of ScriptableObject you're wanting to find instances of. |
Returns
Type | Description |
---|---|
ScriptableObject[] | An Array of instances for the type. |
GetAllInstances<T>()
Gets all the scriptable object instances in the project.
Declaration
public static T[] GetAllInstances<T>()
where T : ScriptableObject
Returns
Type | Description |
---|---|
T[] | An Array of instances for the type. |
Type Parameters
Name | Description |
---|---|
T | The Type of ScriptableObject you're wanting to find instances of. |