- Home /
How to Load an Assetbundle from an Editor Script
I am trying to load several asset bundles using an Editor script (my class is derived from EditorWindow). I am using a WWW object to load the file, but since my class is not derived from MonoBehaviour, I can't use a coroutine to wait for the bundle to finish loading. Instead, I am trying to poll the WWW object in Update and wait until isDone is true. This works when the WWW object is used to download an image file and it works when I use a MonoBehaviour script that runs in Game view. However, it does not work when I try to load an asset bundle this way from an Editor script (my script does not hang, but isDone is never set). What's going on here? Is this a bug? The really strange thing is that when I click on the main window or when I drag my EditorWindow, then the WWW object no longer hangs.
Your answer
![](https://koobas.hobune.stream/wayback/20220613102852im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Loading Assetbundles in Editor-script 2 Answers
AssetBundle.mainAsset 2 Answers
Loading multiple Assetbundles causes a Crash 1 Answer
How to import the object from server to unity 2 Answers
AssetBundle.Unload(false) 2 Answers