Class ScriptableObjectUtility
This is a collection of utilities surrounding ScriptableObjects
Inherited Members
Namespace: Cinemachine.Editor
Syntax
public class ScriptableObjectUtility : ScriptableObject
Fields
kPackageRoot
The default relative path to the root directory where Cinemachine is installed
Declaration
public static string kPackageRoot
Field Value
Type | Description |
---|---|
String |
Properties
CinemachineInstallPath
Get the Cinemachine package install path.
Declaration
public static string CinemachineInstallPath { get; }
Property Value
Type | Description |
---|---|
String |
CinemachineRealativeInstallPath
Get the relative Cinemachine package install path.
Declaration
public static string CinemachineRealativeInstallPath { get; }
Property Value
Type | Description |
---|---|
String |
Methods
Create<T>(Boolean, Boolean)
Create a ScriptableObject asset
Declaration
public static void Create<T>(bool prependFolderName = false, bool trimName = true)
where T : ScriptableObject
Parameters
Type | Name | Description |
---|---|---|
Boolean | prependFolderName | If true, prepend the selected asset folder name to the asset name |
Boolean | trimName | If true, remove instances of the "Asset", "Attributes", "Container" strings from the name |
Type Parameters
Name | Description |
---|---|
T | The type of asset to create |
CreateAt(Type, String)
Create a scriptable object asset
Declaration
public static ScriptableObject CreateAt(Type assetType, string assetPath)
Parameters
Type | Name | Description |
---|---|---|
Type | assetType | The type of asset to create |
String | assetPath | The full path and filename of the asset to create |
Returns
Type | Description |
---|---|
ScriptableObject | The newly-created asset |
CreateAt<T>(String)
Create a scriptable object asset
Declaration
public static T CreateAt<T>(string assetPath)
where T : ScriptableObject
Parameters
Type | Name | Description |
---|---|---|
String | assetPath | The full path and filename of the asset to create |
Returns
Type | Description |
---|---|
T | The newly-created asset |
Type Parameters
Name | Description |
---|---|
T | The type of asset to create |