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?

Your gameobject have monobehaviour script. You have to set this script to using script. Check scripts of gameObject .