‎ ‎
On the Asset Store
SubAssets Toolbox
SubAssets Toolbox
  • Intro
  • Changelog
  • Editor workflows
    • Adding Sub-Assets
    • Removing Sub-Assets
  • API
    • ISubAssetAware
  • Samples
    • SubAssetAwareSO
Powered by GitBook
On this page
  • Drag and drop
  • Create a new sub-asset
  1. Editor workflows

Adding Sub-Assets

Last updated 10 months ago

Drag and drop

To add one or more Sub Assets to an existing asset, simply select the ones you want to add and drag them on top of another asset.

You will be presented with a popup:

Add

By choosing to just Add, the dragged asset will be added as a sub-asset to the destination and disappear from its original location.

Add and Keep Original

By choosing this the original asset will stay in its place, and a new copy will be added to the destination. In this case, all references to the original asset will be preserved.

It's not possible to add sub-assets to assets that already feature sub-assets as a result of the import process.

For instance, adding sub-assets to an .fbx model will result in nothing, because as soon as the asset saves, the import process will reset the sub-assets to the default ones.

Create a new sub-asset

It is possible to create a new asset directly as a sub-asset. Simply right click on the destination main asset, and use the Create menu:

Once you select the asset type, the new asset is created and you can give it a name, like usual:

Once the rename is confirmed, the new asset will be added as a sub-asset to the previous selection.

References

When adding a sub-asset using drag and drop, references to the original asset will break. When this happens, you might have to manually update your references in other objects and scripts if you want them to point to the newly-created sub-asset.

This is due to the fact that it's not the same asset that's being moved: a new copy gets created, and the original destroyed. Unfortunately Unity doesn't allow to just move the asset.

We are exploring a fix for this behaviour to preserve references – available in future versions of SubAssets Toolbox.

Dragging SecondaryMission_1 on top of MainObjective
SecondaryMission_1 is now a sub-asset
SecondaryMission_1 is now a sub-asset, but the original is also preserved
Using the Create menu while an asset is selected, to create a new Material
Renaming the new asset
The new Material is now a sub-asset