- Home /
Missing objects From Build
I was modifying one of the C# code examples ( the catch the egg one ). I added some objects to the scene. They appear in the game preview fine ( pressing the play button ). But when I do a build to an .exe they are missing. It gives me a cannot instantiate error saying the prefab is NULL.
This works fine in the preview but ont in the build.
I have checked:
That the objects are listed on the public vars on the script. They are also listed on the instanced game objects script in the hierarchy.
Any ideas?
I have also checked i am building the proper level in the build settings.
I have also not tagged anything. so it is not editor only.
Answer by Ersin · Jan 24, 2013 at 08:13 PM
Your gameobject have monobehaviour script. You have to set this script to using script. Check scripts of gameObject .
Your answer
Follow this Question
Related Questions
Fastest way to instantiate and move multiple game objects in the editor 3 Answers
Place cubes? problem with my script :S 1 Answer
NullReferenceException on Photon Unity RPC Call 1 Answer
Is there anything wrong with this script? It used to work but now it doesn't. 2 Answers
Change assigned prefab from script 3 Answers