Platform Compatibility
PC | Mac OSX | Oculus Quest |
---|---|---|
X | X | – |
Drop this script on an object to open up its code live while playing a level with the Q key, the E key turns on or off the debug log overlay.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | openEd = false dBug = false function onFrameTick(dt) openEd = obj.checkKey("q") dBug = obj.checkKey("e") if openEd then --Pull up the script editor for this object obj.scriptEditor() end if dBug then --Toggle debug mode on or off if obj.getDebugMode() then obj.setDebugMode(false) else obj.setDebugMode(true) end end end |