Class ScriptableObjectUtils
Inheritance
ScriptableObjectUtils
Syntax
public class ScriptableObjectUtils
Methods
CreateAsset<T>(String, String)
This makes it easy to create, name and place unique new ScriptableObject asset files.
Declaration
public static T CreateAsset<T>(string fileName, string path = "")
where T : ScriptableObject
Parameters
Returns
Type Parameters
GetOrSaveUniqueAsset<T>(T, String)
Saves an asset if it doesn't exists already
Declaration
public static (T, string) GetOrSaveUniqueAsset<T>(T asset, string fileName)
where T : ScriptableObject
Parameters
Type |
Name |
Description |
T |
asset |
|
String |
fileName |
|
Returns
Type |
Description |
ValueTuple<T, String> |
The newly created asset or its existing instance (and its path)
|
Type Parameters
SaveAsset<T>(T, String, String)
Declaration
public static string SaveAsset<T>(T asset, string fileName, string path)
where T : ScriptableObject
Parameters
Returns
Type Parameters