#Workflow for testing autoload/singleton objects? "Run Current Scene" creates ANOTHER instance

3 messages · Page 1 of 1 (latest)

analog wedge
#

I don't think this makes any sense. Autoloads aren't supposed to work in isolation, at least I can't think of a case where this is desirable.
Usually they are created to facilitate between multiple scenes.
So for testing, you'd have to instance some scene that makes use of it.

shy turret
#

eg. persistent data and UI handlers (the docs themselves mention these use cases)

analog wedge
#

Persistent data is just a set of variables without any logic. There is nothing to be tested there. If the script doesn't contain syntax errors it is working fine.
UI handlers have to be tested in context of a scene containing UI elements.