how to activate method one timr unity code example
Example: how to call something once in update
bool isDone = false;
void Update() {
if (!isDone) {
// put your code that runs once here
isDone = true;
}
}
bool isDone = false;
void Update() {
if (!isDone) {
// put your code that runs once here
isDone = true;
}
}