Resource.Load problem

Hi all.

So all im trying to do is load a simple Texture2D from the resource folder.

Yes, i have looked at the scripting section, but the code they have posted doesnt work for C#.

Texture2D Hi = Resources.Load("glass", Texture2D);

Gives me a slew of errors.

So I use instead…

Texture2D Hi = (Texture2D)Resources.Load("glass");

and now when the game runs I get a

“Cannot cast from source type to destination type.”

Anyone want to throw me a bone on how to load resource files in C#… =(

Are you sure that you have it in the Resources folder to begin with. I think I was getting the same message when the file couldn’t be found in the Resources folder. You can also try with the js code to see if you can load with it to begin with