Resources.Load not working in .exe !?
I cant Instantiate after exported to .exe
Has someone had this Problem? Is this common?
GameObject object= Instantiate(Resources.Load("Object"));
Answer by tinglers · Mar 04, 2017 at 02:44 PM
make sure there is a game object called "Object" in the Assets/Resources folder, as that is where it is looking for right now. If this is not the problem do you get any errors/warnings?
Answer by MOUVAL · Mar 04, 2017 at 02:54 PM
Hey thanks for your answer! This was one year ago, so im not sure how i fixed the problem. But yes, it works just fine in the unity editor, so the naming is right, no errors. but after i exported it to .exe it didnt work anymore.
so i just tested it and the line GameObject iObject = Instantiate(Resources.Load<GameObject>("Cube"));
works for me. problems with your code could be that the name object seems to be reserved and that resources.load gives an Object rather than a GameObject
Your answer
![](https://koobas.hobune.stream/wayback/20220612060727im_/https://answers.unity.com/themes/thub/images/avi.jpg)