- Home /
No Resources.Load() avaliable
I may be missing some big thing here, but I'm trying to load a prefab/texture into a GameObject and Texture 2D, but there's no definition in Resouces for the Load() method. Heres an example. The error I'm getting is: 'Resources' does not contain a definition for 'Load' . It's happening on my other computer as well, and Unity is updated on both of them. I've been struggling with this for some time, and help would be greatly appriciated.
public void NewWaveStart() { GameObject Enemy = (GameObject)Instantiate(Resources.Load("Level1Enemy")); intermissionTime = 20; waveNumber++; }
Answer by Eric5h5 · Jan 04, 2013 at 07:45 PM
Don't name your classes the same as Unity classes. (Technically you can, and use UnityEngine.Resources to distinguish that one from yours, but that's a bit of a pain.)
Your answer
![](https://koobas.hobune.stream/wayback/20220613090408im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
I think I abuse of Ressources.load 2 Answers
Resources.Load() Asset Management 0 Answers
How to Load/Unload assets in Editor? 0 Answers
load file from Xcode 1 Answer
In edit mode SocketServer thread will be stopped when any asset change 1 Answer