I have encountered a problem when building for iPhone. It is strange because it only complains for when building for iphone, but then complains at the corrected code when I try it in the editor.
i get an error on these kind of lines.
var obj : GameObject = Instantiate( coinPrefab ).gameObject;
this returns: BCE0019: 'gameObject' is not a member of 'UnityEngine.Object'.
To get this code to build, I simply removed the ".gameObject", and then it compiles fine ( but only when building for iPhone, not for testing in editor )
So my question is: Is there something wrong with this code? Or is there a discrepancy in Unity?
thats what gives me an error when building for iPhone, if i only use Instantiate(coinPrefab), then i get an error in the editor
– anon75224032