- Home /
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.
Answer by Caiuse · Jan 08, 2013 at 03:11 PM
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.
This is a good way, too. I've started doing this, and setting a variable in the first scene loaded so that scripts can look up if the game is the demo or full.
Answer by CodeMasterMike · Jan 08, 2013 at 03:17 PM
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.
Hi Code$$anonymous$$aster$$anonymous$$ike. I actually do this already. What my problems more about the build settings. For example, maybe i only need a couple of scenes in the demo, while all the scenes in the full version. Or a different icon, bundle ID (mobile builds) etc.
Thanks for the answer though.
Answer by zloty · Apr 18, 2013 at 08:02 PM
You can use the SceneManager package from the asset store. https://www.assetstore.unity3d.com/#/search/scenemanager
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.
Your answer
Follow this Question
Related Questions
Selling Games made with Free Assets 4 Answers
How do I share my Unity Demo? 1 Answer
Do I need a license for a free Extension Asset? 0 Answers
How to make prime31 SocialNetworking plugin demo work? 0 Answers
Assets for Free Unity 1 Answer