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

Static Public Member Functions

static T CreateAsset< T > (string typeName, bool select=true, bool prependNew=true)
 Creates a new ScriptableObject asset in the project's asset database.
 
static ScriptableObject CreateAsset (System.Type type, string typeName, bool select=true, bool prependNew=true)
 Creates a new ScriptableObject asset in the project's asset database.
 
static T CreateAssetWithFilename< T > (string filename, bool select=true)
 Creates a new ScriptableObject asset in the project's asset database.
 
static ScriptableObject CreateAssetWithFilename (System.Type type, string filename, bool select=true)
 Creates a new ScriptableObject asset in the project's asset database.
 
static void AddToAsset (ScriptableObject scriptableObject, UnityEngine.Object asset)
 (Editor only) Registers a ScriptableObject as part of an asset in the project's asset database.
 
static void DeleteFromAsset (ScriptableObject scriptableObject, UnityEngine.Object asset)
 (Editor only) Deletes a ScriptableObject from an asset.
 

Member Function Documentation

◆ AddToAsset()

static void PixelCrushers.AssetUtility.AddToAsset ( ScriptableObject  scriptableObject,
UnityEngine::Object  asset 
)
inlinestatic

(Editor only) Registers a ScriptableObject as part of an asset in the project's asset database.

Parameters
scriptableObjectThe ScriptableObject to add.
assetThe asset to add the ScriptableObject to.

◆ CreateAsset()

static ScriptableObject PixelCrushers.AssetUtility.CreateAsset ( System::Type  type,
string  typeName,
bool  select = true,
bool  prependNew = true 
)
inlinestatic

Creates a new ScriptableObject asset in the project's asset database.

Parameters
typeThe ScriptableObject type.
typeNameThe type name to use when naming the asset file in the project's asset database.
selectIf true, select the asset.
prependNewIf true, prepend 'New' to the beginning of the asset name.
Returns
The asset.

◆ CreateAsset< T >()

static T PixelCrushers.AssetUtility.CreateAsset< T > ( string  typeName,
bool  select = true,
bool  prependNew = true 
)
inlinestatic

Creates a new ScriptableObject asset in the project's asset database.

Template Parameters
TThe ScriptableObject type.
Parameters
typeNameThe type name to use when naming the asset file in the project's asset database.
selectIf true, select the asset.
prependNewIf true, prepend 'New' to the beginning of the asset name.
Returns
The asset.
Type Constraints
T :ScriptableObject 

◆ CreateAssetWithFilename()

static ScriptableObject PixelCrushers.AssetUtility.CreateAssetWithFilename ( System::Type  type,
string  filename,
bool  select = true 
)
inlinestatic

Creates a new ScriptableObject asset in the project's asset database.

Parameters
typeThe ScriptableObject type.
filenameThe filename to save the asset as.
selectIf true, select the asset.
Returns
The asset.

◆ CreateAssetWithFilename< T >()

static T PixelCrushers.AssetUtility.CreateAssetWithFilename< T > ( string  filename,
bool  select = true 
)
inlinestatic

Creates a new ScriptableObject asset in the project's asset database.

Template Parameters
TThe ScriptableObject type.
Parameters
filenameThe filename to save the asset as.
selectIf true, select the asset.
Returns
The asset.
Type Constraints
T :ScriptableObject 

◆ DeleteFromAsset()

static void PixelCrushers.AssetUtility.DeleteFromAsset ( ScriptableObject  scriptableObject,
UnityEngine::Object  asset 
)
inlinestatic

(Editor only) Deletes a ScriptableObject from an asset.

Parameters
scriptableObjectThe ScriptableObject to add.
assetThe asset to delete the ScriptableObject from.

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