Editor overwrites scripts when saving

Hi,

I just started learning Babylon and I’m having difficulties with editor v.4.0.3. When I save ts scripts using vscode everything works fine, but if I do changes in the editor and save or run, all changes in script files are gone. Is this how it should be or am I missing something?

Adding @julien-moreau the editor daddy :slight_smile:

1 Like

babylonEditor

Hi @Munanmaistaja !

I can see that you are trying to edit a script that is generated automatically by the editor (that’s why it is overwritten each time you save). This script comes from a graph (graph feature is still WIP). You can find the graph by navigating to the « Visual Scripts » tab in the assets tab of the layout. This generated script can’t be modified by the hand because all the code comes from the graph which is interpreted and then transformed to code.

To add a script that you can modify you can follow this documentation : Editor/attaching-scripts.md at master · BabylonJS/Editor · GitHub

Simply add a new script in the assets and attach it to the desired node

Maybe add a message that says the script cannot be modified like that to inform users.
an idea. :+1:

1 Like