Level Editor - Level becomes unloadable - is there a way to get back in?


Adding Referee scripts to the level I some how got into a situation where I can no longer enter into the editor for my level.

Is there a way to get access back to this level? Or is my level and work now lost?

This is for a level where only local saves have been done. No publish to server yet.

Some of the log from App.js


You could try this script, if you messed up your referee extraCode:



Thank you @trotod I now have access again to my level.

For anyone who is using Safari you can try the following solution.

.1. Right click on the “Loading…” text and click Inspect Element
.2. Look at the HTML page structure and search out where the <div> tags end that display the loading text and graphic loading bar
.3. Inject the following HTML into the page so that you create a button on the web page.

<button onclick="var t = currentView.level.get('thangs');var r = null;for(var i=0; i < t.length; i++) {var h = t[i];if(h.components) {for(var j=0; j < h.components.length; j++) {var c = h.components[j];if(c.config && c.config.extraCode) {r = h;var e = c.config.extraCode;c.config.extraCode = e + '\n{}';console.log('Found referee, commenting out extraCode');currentView.level.set('thangs',t);break;}}}if(r !== null) {break;}}if(r === null) {console.log('Referee not found.');}">Click to Fix the referee Code</button><p>Then refresh the browser page</p>

.3.a. Do this by right clicking on a div tag in the Elements tab of Safari and choose Edit as HTML
.3.b. Append the above code after the </div> tag so it goes between divs and shows on the page
.4. Click the button to execute the code that was discussed by @trotod
.5. There shouldn’t be any on screen visible errors (maybe in the console?)
.6. Click the browsers refresh button

!! You should now have access to a level that was unable to load before due to the error using the Safari browser!

This solution basically takes the Safari / Firefox browsers ability to live edit code in the browser and injects a HTML button that “onclick” runs the code posted for the fix.



@trotod you have saved me 2 hours or rewrite!