Demo and Full versions in same project

Hi folks.

How do I keep a free and full version of a game in the same project?

I usually try to keep both my demo/free version of a game in the same project as the full/premium version, and keep two versions of EditorBuildSettings.asset, which include the correct scenes, bundle identifier (for mobile games), icons etc. for the free and the full versions respectively.

It is however a little pain to rename the two files every time i wish to switch to the other build.

My question. Is there a better/easier way to maintain several versions of your game without needing to keep duplicates of most of the assets, especially scripts?

On Linux i think it could be done nicely with soft-linking parts of the assets folder so code and gfx can be shared between the two projects. Any smart way to do it on windows?

Thanks for taking time to reply.

Wouldn’t having different Scenes for both full and demo version do the job. Then perhaps for testing only include the desired versions scenes in the build settings.

What I have used earlier to distinguish a demo version from a full version, is using a global static boolean called m_demoVersion. And those parts which shouldn’t be available in a demo, I do a check towards this boolean to see if they should be run/loaded/visible/active/etc or not.

Another way, if you want to use a time-based demo, is to use the same boolean, but if the boolean is true, then start a countdown, which will go to a new scene when reaching zero, telling the player to get a full version.

This way, you only need to use one version and only change the boolean between the full version and the demo version.

You can use the SceneManager package from the asset store. Unity Asset Store - The Best Assets for Game Making

You can create multiple scene configurations (e.g. full and demo game) and switch between them before building your project. This will update the EditorBuildSettings for you.

The package provides some more usefull features.