Just to be clear, everything works perfectly in the editor and I have no problems, so I don’t know what I can change.
This is the code in one script
if(Input.GetKeyDown(KeyCode.Space) && canDoTrick){
if(trickTime >= 1){
scoreScript.SendMessage("addScore", points);
}
}
this is the code from the script i’m trying to call
public void addScore(int num){
score += num;
changeDigits(toArray(score));
}
I actually didn’t use sendmessage before, before I had a variable of the script and I called it by assigning it in the inspector, but I tried switching it to sendmessage to see if that would work on mobile, but it didn’t.
Any ideas? I’ve really hit a wall here I don’t know what I can change because it works fine in the editor.