- Home /
Some problems after switch the game for iOS mode
As I have build a game and almost finish. On Pc or Mac to play the game, there is nothing problem.
After I switch the platform into iOS, it suddenly occur so many error. Most of them is talking about "XXXX" is not a member of "UnityEngine.Component" or Unknown identifier."XXXX".
What's wrong about that and why the error occur after switch into iOS. Please help.
Answer by Pong · Sep 03, 2011 at 08:28 AM
Here is one of the error: Assets/script/TimeAttackCounter.js(39,20):BCE0019:'CurHealth' is not a member of 'UnityEngine.Component'.
below is the script
var getHit = GameObject.Find("wai").GetComponent("WaiHealth"); if (getHit.CurHealth == 0)
{
startCounting = false;
Save ();
}
you are using the js script that is the problem they work fine in windows and mac when it come to ios u have to declare every thing. in the error u have not declare the curhealth.that is the problem i think. my sugesstion if u want to build in ios better go for c# scripts.u will not get any problem.
Answer by Pong · Sep 03, 2011 at 12:59 PM
Omg....so how can I fix it and declare all of them?because i am finished the game already and it is not really possible to change them all in c# again. If I want to declare it out, what should I do on the script? Many thx...
Your answer
Follow this Question
Related Questions
Switch statement error 1 Answer
dynamic typing in Unity iOS: ...not a member of 'UnityEngine.Component' 2 Answers
Unity 4.3 with Xcode 5.0.2 build errors 1 Answer
"Terminated due to memory issue" but not memory issue 0 Answers
iOS FPS Kit 0 Answers