how to call something once in update

154

how to call something once in update -

bool isDone = false;

void Update() {
    if (!isDone) {
        // put your code that runs once here
        isDone = true;
    }
}

Comments

Submit
0 Comments