Resources.Load method missing....

Code: FileResource = (TextAsset)Resources.Load(fn, typeof(TextAsset));

See Attached Image of Error

Running version 3.5.6f4 PRO and can’t use Resources.Load in C# any more.

Not sure if that has an influence, but you placed the script itself in a Resources folder. Just guessing.

Maybe there’s some other class/component in scope called ‘Resources’ ?

Resources is a class that has methods, one method that it has is called “Load”, this method allows you to load a resource from a physical file and it worked prior to the update. Even if you create a C# script file and put it outside of my “Resources” folder, it still doesn’t work because for some reason Unity editor doesn’t know about the Resources class having a method called “Load”.

Found a solution with this version of Unity, I had to call the method directly using UnityEngine.Resource.Load which I didn’t have to do in the last version, which suggests a change in class hierarchy in the back end, oh well, as long as I got a solution.

You likely have a class called Resources in your project, like superpig mentioned.

It tries your Resources class (which doesn’t have a Load function) instead of Unity’s unless you specifically tell it to use Unity’s with UnityEngine.Resource.Load.

After reading the post I thought about that and renamed the folder to GameResources, saved the scene, quit Unity, gone back in and still the exact same problem with nothing else in the entire project called Resources, so that is definitely not what the problem was, but as I mentioned, this worked in the last build of Unity but not in this build and the only way around it is it call the method through the namespace hierarchy.

Thanks though.

it has nothing to do with folder names and filenames.
Open MonoDevelop and open the project wide search and search for class Resources

if its not there and assuming you didn’t forget ‘using UnityEngine’ at the top of your code file, and assuming that Assets - sync monodevelop in the editor didn’t help, something absolutely broke as UnityEngine.dll must have gone missing from within the unity installation itself and you will need to reinstall unity.

My analysis must be correct, then - you have another class called “Resources” at global scope. Using the full assembly-qualified name forces the compiler to use the Unity class rather than your own. If you didn’t have such a class, the error would not have been “does not have a Load method,” it would have been “unknown type Resources.”

Bear in mind that having a file called “Resources.js” will probably count as having a class called Resources.

Sorry its is not correct, I have no other classes in the project called “Resources”, none what-so-ever, not even a javascript file called “Resources.js”, I simply have no other class in the entire project called “Resources”. Goofy I know, but either way, only solution I have for this project is simply to use the full namespace.class.method convention.

Only thing left I haven’t tried is to re-install Unity, might do that tonight.

After a full remove of Unity then a full re-install, the problem didn’t occur again so I could go back to just using Resources.Load, so something didn’t update correctly during the update process.