Method AddAsset
| Edit this page View SourceAddAsset(Object, Object)
Registers a new asset with the same asset dependencies as the original asset and generates a unique AssetID.
Assets can be added at any time and will be registered as soon as the vanilla loader is ready.
Assets can be added at any time and will be registered as soon as the vanilla loader is ready.
Declaration
public AssetID AddAsset(UnityEngine.Object asset, UnityEngine.Object original)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | asset | The asset to register |
| Object | original | Assets to copy dependencies from |
Returns
| Type | Description |
|---|---|
| AssetID | AssetID generated from the prefab's name |
AddAsset(Object)
Registers a new asset and generates a unique AssetID.
Assets can be added at any time and will be registered as soon as the vanilla loader is ready.
Assets can be added at any time and will be registered as soon as the vanilla loader is ready.
Declaration
public AssetID AddAsset(UnityEngine.Object asset)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | asset | The asset to register |
Returns
| Type | Description |
|---|---|
| AssetID | AssetID generated from the prefab's name |