Hello, I’m trying to create some usefull snippets of js I can paste into browser console from the online editor for process some data into my assets.
so far this work for renaming items in hierarchy :
var asset=editor.call('selector:items')[0];
asset.set('name','TEST');
but if I select an asset instead (i.e a material) and type this :
var asset=editor.call('selector:items')[0];
asset.set('name','TEST');
i have this output:
true
editor.js:33546 Error: invalid:path(1)
at Connection.handleMessage (editor.js:13101)
at socket.onmessage (editor.js:13054)
at WebSocket.connection.socket.onmessage (editor.js:14776)
anything I’m missing?
glad to see any docs around for that kind of coding too, I just found this so far : Scripting the PlayCanvas Editor
thank you for any help