Answer the question
In order to leave comments, you need to log in
How to pass a variable to another function?
How to pass the value of a variable from one function to another function?
var score: int;
function get() {
text = "100";
score = parseInt(text);
}
function Awake()
{
get();
Debug.Log(score);
}
Answer the question
In order to leave comments, you need to log in
function get(text) {
return parseInt(text);
}
function Awake() {
console.log(get("100"));
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question