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.

if i can know the errors i can help u

–

2 Answers

2

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.

–

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…