Hello everyone.
I want to know how to use AssetBundle to load UXML and USS? Has asset dependency been handled?
Hello,
You can work with UXML (represented as VisualTreeAsset) and USS (represented as StyleSheet) and Asset Bundles just like any other Unity asset, meaning that you can assign them to asset bundles in the inspector and load them from bundles.
In terms of asset dependencies, you will be good as long as you as:
- In USS, you use
url()
to references images or fonts - In UXML, you use
src
to reference UXML files or USS files
Those two ways guarantees that Unity properly detects asset dependencies.
Hope this helps.
Thanks for your answer, I will try it according to your instructions