[SOLVED] GUI Nested template script not loaded

Hello Defold community !

I just started out Defold, and trying to make an Idle game, mostly with GUI.

As I like splitting things, I started to have nested template of GUI but now my last nested GUI can’t load attached script…


If it’s a normal behaviour, how should I separate gui script to avoid having one big file ?

Thank you

Yes, you can only have one gui script. The scripts on templates are ignored.

If you want to separate things then perhaps you can split your gui code into multiple Lua modules which you call from your main gui script?


Thank you, that explains why… I thought it was my mistake.

I will find a way to decouple code.