-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
If draw() or a function that calls draw() like windowResized() is called in the setup() function defined in a scene object, setupExecuted will not have yet been set to true and setup will again be called, resulting in runaway recursion. The workaround I'm using is to set setupExecuted to true before calling a function that calls draw(), as demonstrated here:
this.setup = function() {
this.sceneManager.scene.setupExecuted = true;
this.windowResized(); //NOTE: Requires setupExecuted override above to prevent infinite recursion
}Metadata
Metadata
Assignees
Labels
No labels