How do I compile different builds of the same project using compile flags in Unity?
Hello, I'm somewhat new to Unity development. While I have already played around and developed a few, basic short games of my own, I haven't developed a long time project on Unity yet. So, I would like to know how do I develop different builds from the same project using compiling flags on Unity? I have seen some answers, but they are fragmented and do not give me a complete and satisfactory answer. I'll give some examples of what I mean:
Ex 1: I want to develop a WebGL game using external microtransaction and achievement APIs like Kongregate and Armor Games. How do I develop the project so I can compile a Kongregate version or a Armor Games version whenever I like, using the same assets and code? I know of C# preprocessor directives of course, I have already used them on my job many times, but I'm wondering if I would have to use them together with some sort of Unity Editor Scripts, and how that would work.
Ex 2: I want to develop a full game and a demo from the same project. The demo is going to have only 2 levels, the full game is going to have 10. How do I switch from one to another at the click of a button, like I do for the platform to be used? Should I use C# preprocessor directives again? It doesn't look pratical to rewrite one line each time I want to compile my code.
Ex 3: I have develop my game using Unity Ads, but for some reason, I can't publish it on a story while using Unity Ads, instead I have to use the store ads system. Is there any pratical way I can change it without having to rewrite C# preprocessor directive each time?
My questions aren't about platform dependency compilation, instead they are more about third party library compilation into an Unity project. How is the best way to solve that problem?
Your answer
Follow this Question
Related Questions
Compiling Scipts shows and then Unity crashes. 0 Answers
Unity freezes when "compiling assembly definitions files scripts" while creating a new project 0 Answers
i can't find the gui textures tab 0 Answers
Help me I lost my project! 0 Answers
why cant i get into my project without the unity bug reporter stopping me 0 Answers