I have some options in my game (i.e player invincibility) that I use for development purposes only and I want to ensure these options don’t get used when I build the game. Is there any good solution for this?
There are lots of ways to deal with this. A lot of people have some sort of CLI for their game that allows you to enter commands … that would just be a matter of not publishing them but eventually people might find them.
You could enable it by running the application with some sort of debug flag so its not visible to anyone without it.
You could do it by build specific config using configuration transforms.
You could have a specific dev/ debugging player control that you load into your game on dev builds instead
You could use the #if DEBUG
preprocessor directive to literally strip the code from specific builds.
There are lots of ways to do it.