NOTE: This issue I’m talking about is only on Unity 5.x, forgot to mention that in title.
Already fixed this, but I thought I’d post here just in case anyone runs into similar problems. I had a scriptable object saved to disk as an .asset file in my Resources folder. My script (that worked in Unity 4.x) is supposed to load the scriptable object from disk at runtime and store the type of the script in a singleton. However, in Unity 5 the Resources.Load function would keep returning null… but only on an Android build (it worked fine in editor). Here was the old code that doesn’t work:
instance = Resources.Load<PluginDatabase>("PluginDatabase/" + SAVE_FILENAME);
When I changed it to this, it now works both in editor and on an Android build:
instance = (PluginDatabase)Resources.Load("PluginDatabase/" + SAVE_FILENAME, typeof(PluginDatabase));
Should not both methods produce the exact same result (preferably the result that doesn’t break my code)? I feel this is worthy of a bug report.