Build variants

It will be cool, if i can build release and debug variants.Or something like flawors in android. For example when i build debug variant a want to show additional debug ui. Or enable analytics/ads only in release.

1 Like

What we do here at King is that we have settings such as those you mention as values in a custom section in game.project and at build time we set or remove these values. Something like an additional section in game.project:

[foobar]
enable_debug_ui = 1

And in code we check the value like this:

if tonumber(sys.get_config("debug.enable_debug_ui", 0)) == 1 then
    -- show debug ui
end
2 Likes

thanks, look like what i need. :slight_smile:

2 Likes