diff --git a/source/funkin/Conductor.hx b/source/funkin/Conductor.hx index 05c23108f..383a49084 100644 --- a/source/funkin/Conductor.hx +++ b/source/funkin/Conductor.hx @@ -36,7 +36,15 @@ class Conductor * You can also do stuff like store a reference to the Conductor and pass it around or temporarily replace it, * or have a second Conductor running at the same time, or other weird stuff like that if you need to. */ - public static var instance:Conductor = new Conductor(); + public static var instance(get, never):Conductor; + + static var _instance:Null<Conductor> = null; + + static function get_instance():Conductor + { + if (_instance == null) _instance = new Conductor(); + return _instance; + } /** * Signal fired when the current Conductor instance advances to a new measure. @@ -505,6 +513,6 @@ class Conductor */ public static function reset():Void { - Conductor.instance = new Conductor(); + _instance = new Conductor(); } }