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