Update lua scripts on "Play Game" in editor

I’m using a text editor to edit my lua scripts and pressing ctrl-g in editor to see the changes. Very frequently, the editor does not update the scripts when I change them. Maybe this works if you use the LY Lua IDE, but I don’t use that for various reasons. This might also be exacerbated by the fact that some of my scripts use require() - last time I looked into this it seemed LY was doing some funny things that prevented me from even using Lua code to re-load my required scripts.

It would be extremely nice if LY reloaded the scripts from file when you press ctrl-g. Maybe make this an option somewhere. As it is now I have to restart the editor every time I make any change to a script in order to see the effects. I’m not good enough with c++ to figure out how to make these changes in LY myself.

Super valid! I’ve submitted this to our team for further action :slight_smile: Thanks @Catma!

Just wanted to add that I’ve also been dealing with this. Even when using the in-editor Lua IDE, I would need to either remove->add the the root Lua script from the component, or re-open the level.

Thanks @naotoy – I’ve added this note on your behalf to the submitted note to help elevate the topic. On that note, I’m very sorry for this frustrating experience – will keep this thread updated on any news :slight_smile:

Has this been fixed. I am also experiencing this quite often. From time to time my scripts update properly, however the last few days I need to restart the editor every time I make a change.