Adding Sub-Assets

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.

Last updated