Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by valdelievre · Sep 12, 2012 at 09:53 PM · androidiosbuildfree

How do you manage your Free and Paid Android/iOS game(C#)

Hello,

I was wondering how do you manage your Unity3D project when you have a Free and Paid game in term of code maintenance as well as buids.

1. Code Maintenance

Free Version ( com.game.freeversion )

  • I would limit the free version to the first 15 Levels and have the other one locked. I was thinking to define a preprocessor block like

       #define LITE
         ...      
         #if LITE            
           freeVersion = true;          
         #endif
    
         if(freeVersion) { ... }
    
    
    

As far as i understood, when you have '#define LITE' in the code(at the top of the source), LITE is implicitly set to TRUE. If not defined, it is FALSE. As a consequence, to build my lite version of the project i need to add this line dynamically, maybe with an 'ant' task before compiling the project, which i find really painful

Pro Version( com.game.paidversion )

2. Build

If i want to build both projects in one shot, i guess i would need to have unity3D Pro and play around BuildPipeline.BuildPlayer to manipulate the packagename + set the correct #define in my code.

Do you mind sharing your experiences ? Maybe there is an easy way ;)

Thank you very much

Florent Valdelievre

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by mindlube · Sep 13, 2012 at 05:12 AM

Florent, I can't speak to #2, although I have Pro license, just find #define to be easier. the problem is you have to #define at the top of every script. So you may need global defines plugin from prime31

edit Nov 10 2012: In Unity4, this global define functionality is built-in to the editor: In PlayerSettings | Per-Platform | Other Settings | Configuration : Scripting Define Symbols.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image valdelievre · Sep 13, 2012 at 08:41 AM 0
Share

Thanks for that, It looks like we need to reimport the project each time we change the global define which might be long on my project, but its an alternative yes. Since i want to build for Android + Ios for LITE and PRO version, it means i would need 4 differents build. I will need to find an automatic way to do it though since i don't want do it through the editor.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

11 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Am i able to export to android with 30 day pro ? 3 Answers

Huge iOS Build 1 Answer

Why is there no "Render outside safe area" setting for iOS? 0 Answers

Build stripping and scenes in Asset Bundles 1 Answer

Distribute terrain in zones 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges