Hi. I am working on a game and everything runs fine when I test it using Unity Remote. I can play the game while while controlling it with the iPhone and watch it run in the editor.
But when I try to build the game I get the following error: Error building Player because scripts had compiler errors
The Error it is refearing to is the following: Assets/MyScripts/SpawnScript.js(42,73): BCE0019: 'NewParent' is not a member of 'UnityEngine.Component'.
Now I understand where the error is pointing me. What I dont understand is why does it run fine when I test it in the editor using the play button.
The following script is what the error is referring to:
What I am doing here is assigning a new parent to a instantiated clone. This has to be dynamic because the parent often changes. And who the new parent should be is determined by the EntryScript on EntryGameObject. Again, this all works perfectly fine when tested in the editor.
answered Jan 01 '11 at 04:00 PM