Does the 'Resources' API Still Exist In WebGL?

I’ve spent the day attempting to update my studio’s iOS/Android/WebPlayer project to build into WebGL, and uh… it appears that Unity’s WebGL build process is nulling references to various assets located in Resources throughout my scenes?)

…And that Resources.LoadAll does not work on OpenGL, but this is “by design”? Unity Issue Tracker - Resources.LoadAll() not working in the WebGL

…And that the entire Resources API may soon be flagged obsolete? List with obsolete API? - Unity Engine - Unity Discussions

I haven’t been able to find much about any of this on google, only these little pieces. So like… are y’all gamedevs using the Resources API as usual (Resources.Load, Resources.LoadAll, etc) in your webgl stuff, and is it working as usual? Am I just doing something stupid somewhere in this project? What am I missing here?

Resources.Load and Resources.LoadAll should still work as expected and there are no plans to deprecate them, at least in the short term. If you encounter any problem I would suggest that you submit a bug report.

1 Like

It looks like the problem had to do with loading two levels immediately after one another; waiting for one frame in between loads appears to resolve it. As this issue only occurs in WebGL, I expect this is a bug; I’ll see if I can get a test case together.

Test case produced, bug reported! It’s case 707488.

Thank you for the bug report, we will take a look.

1 Like