- Home /
Using Asset Bundles with Editor scripts
I've been doing some editor scripting on a script that manages tool slots in a machine.
I want to create a tool and attach it in editor so I don't have to waste time in VR attaching everything manually. So for my editor script I would need references to the prefabs, but I don't want to drag every tool individually and have a long list in the inspector.
I've looked into Resource folders, but they are not recommended to be used when building the project as they will slow down load times.
So I turned to Asset Bundles that are meant to store files into bundles to be accessed by the game. I created a Asset Bundle with my tools inside with the help of AssetBundle Browser
I tried these 2 code examples, but I can't access the files or I don't get a response back. http://answers.unity.com/answers/169818/view.html https://docs.unity3d.com/ScriptReference/AssetBundle.LoadFromFileAsync.html
$$anonymous$$aybe you just forgot to pack/re-pack the asset bundle. Since if you use assetbundle, you have to repack it everytime you change scene or any asset.
Nope. Done everything I had to do with the files before I bundled them and hadnt touched them since.
I thought that the bundle didnt build properly. So I rebuilt the bundle twice already before I posted this question.
I will upload a screenshot of my build settings when I get back to my PC