Editor scripts example fails to compile

Copy-pasting Editor script example from here results in:
ERROR:EXT: Compilation failed:
ERROR:EXT: [string “/test.editor_script”]:29: ‘}’ expected (to close ‘{’ at line 27)

Happens on 1.2.166, but I don’t think it’s version related. The example seems to contain faulty code.

I pasted the example to test.editor_script file in top-level folder, don’t know if that’s important detail.

There should be a comma here:

...
27 {
28       label = "Minify JSON" <---
29       locations = {"Assets"},
30       query = {
31         selection = {type = "resource", cardinality = "one"}
32       },
...
2 Likes