Resources.LoadAll() error in WebGL
I'm trying to load resources at game load in WebGL with the following code:
Debug.Log("RESOURCE LOOKUP A1");
Resources.LoadAll("", typeof(ResourceLookup));
Debug.Log("RESOURCE LOOKUP A2");
ResourceLookup[] resources = Resources.FindObjectsOfTypeAll<ResourceLookup>();
Debug.Log(resources.Length);
This is the result in both Firefox and Chrome
The 1 object detected is a newly created GameObject prefab in the resources folder with only the ResourceLookup component attached. Deleting this object from the project will still produce the same output, with the exception of the last Debug.Log(resources.Length) being 0 instead of 1.
I tried loading other types as well, and it seems to always happen to the first Resources.LoadAll and not to subsequent calls.
I checked my entire assets folder and scene for missing script references both manually and through script http://wiki.unity3d.com/index.php/FindMissingScripts and none was missing. I haven't deleted anything recently anyway as far as I am aware.