Search Unity

Advanced Builder - Manage multiple versions of your game

Discussion in 'Assets and Asset Store' started by PygmyMonkey, Jan 13, 2014.

  1. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    It would be great if you could make the scene list re-orderable. We have quite a few scenes per config, and when I need to insert one at the top for example its a pain to re-order as I have to remove them all, then add back in.
     
  2. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hey :)

    This is a really great suggestion. Will do that for the next update ;)
     
    mimminito likes this.
  3. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    So, now that Unity has moved all of the old "pro" features into their personal edition, Advanced Builder now doesnt require Pro to use all of its features. I believe the build pipeline is now available to the free edition! Great news :D
     
  4. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Yes that's great news!
    I must check to see if it really is like this, but yes :p
     
    mimminito likes this.
  5. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Hi,

    I was wondering if you would consider adding in support for a third party plugin we are going to start using. Its called Fast Platform Switch, and it caches the platform data so switching is much faster as assets do not have to be converted/re-imported. If they had a custom define which you could check for, would you then be able to add in a new check box under "Build options" to enable the use of Fast Platform Switch? It would make building multiple versions so much faster!

    Adam
     
  6. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hey :)

    You're not the first to ask for the support of Fast Platform Switch. I've contacted them multiple times without any answer... but I'll add that on my the list of features so I can make them compatible.
    Also, I've planned for a long time (I don't know when it will be done...) to natively add what Fast Platform Switch does to Advanced Builder.
     
    hopeful likes this.
  7. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Well, thats even better support then :D Ive noticed its only a couple classes which does all the heavy lifting, so might not be too complex.

    I was considering modifying both to get them working for now, ill see how it pans out. Shouldnt be too much hassle, and will save a LOT of time with our big projects!
     
  8. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hehe :)
    If you want to use the two really soon, I recommend trying to do the integration on your own for now as it's not at the top of the list of the features, sorry :/
    And yes, it saves a LOT of time, like a LOT.
     
  9. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Yeah I think I will. Its going to help in the long run here, and hopefully I can just merge the changes in if you do updates.
     
  10. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Hi, I dont know if its been reported before but when importing Advanced Builder into a new project and selecting the 'Apply this config' button, the first time it will crash the window and logs a NullReferenceException. Works fine after the first time however.

    Here is the log:
     
  11. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Hi,

    I am using Unity 4.6.3 for the x64 support, and ive noticed that Unity now has a 'Bundle Version' and 'Short Bundle Version'. The 'Short Bundle Version' relates to the Version property in XCode, and the 'Bundle Version' is assigned to the Build property. Any chance you could support both of those? Maybe allowing us to modify them both per build?
     
  12. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Thanks a lot for the feedback!
    I'll check and fix that ;)
     
  13. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    I'll take a look into that in the following days. In the meantime if it's blocking you to do something, you can do this by yourself, once again in the OnPre/OnPost build methods!

    PS: Thanks for all the feedback, this will improve the tool a lot ;)
     
  14. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    No worries. I was worried at one point support had been dropped for this, but in recent months you have provided a lot of support, meaning I dont have to create my own solution for the little tweaks we needed :) Keep up the good work, its a great time saving asset.
     
  15. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Thanks a lot!
    I'm now almost fulltime to develop Asset Store tools, so yes, support will only increase ;)
    Also, I xas not giving love to AdvancedBuilder recently because I've just submitted my new tool to the Asset Store!
     
  16. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Awesome. I have just finished work on an update to an asset I am about to submit to the store as well. Allows switching of configurations for your UI at run-time and you can preview it in the editor as well.
     
  17. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Drop me an email at tools@pygmymonkey.com if you want ;)
     
  18. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hello everyone,

    An update will be available very soon on the Asset Store!
    This is an update that will change the folder structure of Advanced Builder and cause issues if you don't follow these simple steps, so please, follow them :D

    IF YOU ARE UPGRADING FROM A VERSION OLDER THAN 1.4.0, PLEASE FOLLOW THESE SMALL STEPS
    1. Save the file "AdvancedBuilder/Editor/AdvancedBuilder.asset" somewhere,
    2. Close the AdvancedBuilder window,
    3. Remove entirely the AdvancedBuilder folder,
    4. Import the new version of AdvancedBuilder,
    5. Put back the file you saved, inside the folder "PygmyMonkey/AdvancedBuilder/Editor",
    6. Open the AdvancedBuilder window and you're good to go :)

    Here's the changelog:
    Version 1.4.1
    - NEW: You can now reorganize the scenes you selected for each configuration.
    - NEW: You can now decide if you want to let Advanced Builder decide which scenes are build in the ‘AdvancedSettings’ section.
    - NEW: You can now set a custom file name for your build (in addition to the build folder path).
    - NEW: Added $TEST_COMPRESSION and $PRODUCT_NAME constants for custom build folder path and custom file name.
    - FIX: Android bundle version code if you were using FAT/x86/ARMv7.

    Version 1.4.0
    - NEW: You now open Advanced Builder via the menu “Tools/PygmyMonkey/Advanced Builder”, it was previously in “Windows/Advanced Builder”.
    - NEW: Changed all the namespaces from “com.pygmymonkey.tools” to “PygmyMonkey.AdvancedBuilder”.
    - NEW: Moved the entire “AdvancedBuilder” folder inside a “PygmyMonkey” folder.
     
    mimminito likes this.
  19. Hertzole

    Hertzole

    Joined:
    Jul 27, 2013
    Posts:
    422
    Hi!

    Since Unity 5 pretty much is a pro version of Unity, wouldn't you be able to use Advanced Builder fully now?
     
  20. OnePxl

    OnePxl

    Joined:
    Aug 6, 2012
    Posts:
    307
    Yes.
     
  21. Hertzole

    Hertzole

    Joined:
    Jul 27, 2013
    Posts:
    422
    But still I am not able to do it. It doesn't allow me to build. The button is greyed out and unpressable.
     
  22. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hello!
    In fact, I just completely forgot to reactivate things for Unity5...
    If you don't want to wait for the next update, you can just open the AdvancedBuilderRenderer.cs file, and comment lines 113 to 118!
    You also have to open ProjectConfigurationsRenderer.cs, and remove UnityEditorInternal.InternalEditorUtility.HasPro() from line 178.

    It should work, but hasn't been tested ;)
     
  23. Hertzole

    Hertzole

    Joined:
    Jul 27, 2013
    Posts:
    422
    Thank you! This works great! :D
     
    PygmyMonkey likes this.
  24. phoenixrising

    phoenixrising

    Joined:
    Aug 9, 2013
    Posts:
    57
    Hi,
    I really like this tool, thanks for making it and maintaining it.
    Is it possible to specify a different icon for the different release types? Also, a specific splash screen for each release type?

    Thanks again
     
  25. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hello :)
    Thanks a lot for the nice comments!

    Specifying different icons is something I will add in a future update (I hope really soon).
    You can however, do that yourself in code, using the OnPre/OnPostBuild methods. (take a look at the doc here).
    And you can use the sample code below, and adapt it to your needs while the update is not done.

    The PlayerSettings.SetIconsForTargetGroup API takes the BuildTargetGroup and an array of texture2D of all the icon sizes.
    The thing is, you have to specify the exact texture array size for each BuildTargetGroup, and the size is not the same for Android or iOS for example...

    So what you can do, is first get the sizes for a platform using PlayerSettings.GetIconSizesForTargetGroup(targetGroup); once you have all that, you put your icons in a folder, with the name MY_ICON_XX where XX is the size.
    Code (CSharp):
    1. private static void AssignPlayerSettingsIcons(BuildTargetGroup targetGroup)
    2. {
    3.     int[] iconSizeArray = PlayerSettings.GetIconSizesForTargetGroup(targetGroup);
    4.     Texture2D[] iconArray = new Texture2D[iconSizeArray.Length];
    5.  
    6.     for (int i = 0; i < iconSizeArray.Length; i++)
    7.     {
    8.         Texture2D iconTexture = AssetDatabase.LoadAssetAtPath("YOUR_ICON_PATH/MY_ICON_" + iconSizeArray[i] + ".png", typeof(Texture2D)) as Texture2D;
    9.      
    10.         if (iconTexture != null)
    11.         {
    12.             iconArray[i] = iconTexture;
    13.         }
    14.         else
    15.         {
    16.             Debug.LogError("Error, could not find icon with size : " + iconSizeArray[i]);
    17.         }
    18.     }
    19.  
    20.     PlayerSettings.SetIconsForTargetGroup(targetGroup, iconArray);
    21. }
    As it seems you're happy with the tool, if you could take a few seconds to rate it 5 stars and leave a nice comment, that would help a lot!

    Have a nice day.
     
    Last edited: Feb 24, 2016
  26. imurashka

    imurashka

    Joined:
    Aug 5, 2012
    Posts:
    20
    Hi again!

    How can i get buildDestinationPath in my custom build script?

    Thanks
     
  27. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hi :)

    I will add that for the future release, thanks for the suggestion.
    In the meantime, if you want to do it:
    - Open PlatformBuilder.cs and line 52 and 54, add the m_buildDate variable at the end of the performPreBuild and performPostBuild methods, like so:
    Code (CSharp):
    1. performPreBuild(configuration, m_buildDate);
    2. performPostBuild(configuration, m_buildDate);
    - Do the same for the method definitions and calls, line 72, 77, 167 and 172.
    Code (CSharp):
    1. private void performPreBuild(Configuration configuration, DateTime buildDate)
    2. m_advancedCustomBuild.OnPreBuild(configuration, buildDate);
    3. private void performPostBuild(Configuration configuration, DateTime buildDate)
    4. m_advancedCustomBuild.OnPostBuild(configuration, buildDate);
    - Open IAdvancedCustomBuild and add buildDate to the methods line 5 and 6:
    Code (CSharp):
    1. voidOnPreBuild(Configurationconfiguration, System.DateTimebuildDate);
    2. voidOnPostBuild(Configurationconfiguration, System.DateTimebuildDate);
    - Finally, fix the errors you'll have on every script that uses the custom build solution ;)

    This should work, not been tested yet!
     
  28. phoenixrising

    phoenixrising

    Joined:
    Aug 9, 2013
    Posts:
    57
    Is there a way after I set everything up within advanced builder to then make the unity build settings and unity player information match the specific build that I have specified within Advanced Builder?

    For example, I setup build A with scenes 1,2,3 and com.company.a
    and build B with scenes, 2,3,4,5 and com.company.b etc

    I would like a way to make the unity build settings reflect this information with either one button press or some command so that I could say ok Unity Build now you are using setup A

    and then later ok Unity Build now you are using setup B

    Thanks
     
  29. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hello!

    Yes you can already do that. Once you've specified your different configurations (such as build A and build B). In each configuration, there is a "Apply config" button that will do just what you want :)
    Next to the "Apply config", there is also the "Build" button, that will build just this configuration (so you don't have to go to the Unity Build Settings).

    Feel free to ask any question ;)
     
  30. SidarVasco

    SidarVasco

    Joined:
    Feb 9, 2015
    Posts:
    163
    Hey do you have an idea why the bundle Identifier keeps changing back to something I had previously? Is there a cache I can clear or something similar?
     
  31. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Thats a strange one, not something I have seen before. The one file you can delete is the AppParameters file, this is just a cache of your current config which are then available at runtime for you. Never delete the AdvancedBuilder.asset file as this contains all of your config (unless you have a simple config and are able to input everything again).
     
  32. SidarVasco

    SidarVasco

    Joined:
    Feb 9, 2015
    Posts:
    163
    Yeah sorry, false alarm. New to advanced builder, someone else setup the config files and then handed it to me. Had no idea it was defined in a separate file. Sorry.
     
  33. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    No problem, glad it worked out!
    Also, thanks @mimminito for helping ;)
     
  34. davekalina

    davekalina

    Joined:
    Apr 2, 2013
    Posts:
    39
    Can this utility be invoked properly from the command line?

    We have a build server that autobuilds our pc/mac/linux/iOS/Android versions every night. And otherwise this tool looks like it would be immensely helpful -- particularly for the ability to swap the scenes present in a given build, and for the potential to have differentiated Android releases.

    But if we can't trigger different build "flavors" from the command-line, it's a non-starter.

    Thanks,
    David
     
  35. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hello David!

    Yes you can do that :)
    You just have to open and set up your different configurations in Advanced Builder in Unity (on your build server for example). And then there is a static method you can call when you open Unity from the command line, that will build every configuration you specified.

    Is this what you were looking for?
     
  36. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    A new update is available now :)

    Version 1.4.2

    - NEW Added buildDate to OnPreBuild/OnPostBuild events.
    - UPDATE Moved some options (Open build folder after build, Dev build, Autoconnect profiler, Allow script debugging, Autorun) to configurations, so you can set them for each configuration.
     
    mimminito likes this.
  37. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    This was going to be my next request :)
     
    PygmyMonkey likes this.
  38. Dan2013

    Dan2013

    Joined:
    May 24, 2013
    Posts:
    200
    This tool seems cool.
    I am wondering how is it compared to Unity Cloud Build (https://build.cloud.unity3d.com)?
    Would some one give some list of advantages and disadvantages when doing the comparing?
     
  39. fidelsoto

    fidelsoto

    Joined:
    Aug 7, 2012
    Posts:
    87
    This would be great in conjunction with Fast Platform Switch.
     
  40. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    This is not really comparable to Unity Cloud Build. This is an in editor solution which allows you to configure multiple builds and then build them all at once with a single button click. It can be used in conjunction with Cloud Build, if they allow you to specify a command you can call to make the builds.
     
  41. Dan2013

    Dan2013

    Joined:
    May 24, 2013
    Posts:
    200
    The deal ended ... T_T
     
  42. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hello Dan!

    Sorry for the late reply :/
    I have yet to make a real comparison of Unity Coud Build and Advanced Builder, but basically :

    - Unity Cloud Build
    Will build a new version of your game for each "modification" you make to your project (via version source control), and will directly create a WebPlayer, an Android apk or an iOS build that you can directly install on your device with a click of a button. So you don't have to worry about waiting and building to finish on your machine, then sending to device etc...
    The disadvantage with the Free version of Unity Cloud Build, is that you have only basic options. That means, just being able to create builds without specifying anything (such as custom defines, dev builds, etc...).
    Also it only supports Android, iOS and WebPlayer for now.
    And can cost a lot of money : Free, $25/month or $100/month if you want all the features.

    - Advanced Builder
    Is an editor extension, with which you can define multiple configurations of your project, so for example, Android Demo, Android Full, iOS Demo, iOS Full, Android Samsung App Store, WebPlayer Steam, WebPlayer own website etc... each configuration having some parameters that you can define to do specific things depending on the platform etc...
    Once you've defined all your configurations, you can build for all of them, in just on click. It will apply all the things you specified for each configuration (so for example, you can have different scene depending on your configuration, or set different custom defines, different package name (bundle identifier) etc...).
    Basically, instead of manually editing all the things for a specific platform, build, then specify all the other things for another platform etc... (which requires a lot of step and can have a lot of errors during the process). You just define everything once, and press a single button :)
    Advanced Builder also have a lot of options that Cloud Build do not have (or have when you pay monthly), such as specifying scenes per configuration, dev builds, supporting multiple bundle identifiers, multiple texture compressions, device filters for Android (x86n ARM, FAT), custom defines.
    You also get the ability to define your own custom scripts, by using OnPreBuild and OnPostBuild callbacks, so if Advanced Builder does not do some things specific that you want. You can tell it to to whatever you want before each build (via the OnPreBuild callback) etc...

    If you need anything else, please tell me ;)

    PS: If you missed the sale, I'll be happy to refund the difference. Just buy it full price and send me an email with your paypal address ;)
     
  43. Dan2013

    Dan2013

    Joined:
    May 24, 2013
    Posts:
    200
    I see. Advanced Builder does provide some functions I may want.
    You are so nice. I'll contact you for discount things. :)


     
  44. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Glad I could help!

    Have a nice day ;)
     
  45. djfrail

    djfrail

    Joined:
    Jan 16, 2014
    Posts:
    124
    Is there some Advanced Builder files I can exclude from source control? Like maybe the AppParameters.asset file or the AdvancedBuilder.asset file? One of these keeps changing (I think it's AppParamters.asset) every time I hit the build button from Advanced Builder.
     
  46. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    AppParameters.asset will change each time, as its a copy of the configuration you have chosen for that build. This means you can access the config inside your build. You could exclude it yes, as its generated for builds and nothing else.
     
  47. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    As mimminito said (thanks a lot dude :D), yes you can exclude AppParameters.asset from version control.
    But you should keep AdvancedBuilder.asset in version control, as it's the file that list all the different configurations you created in Advanced Builder, and you want to share that with others people on your team. Or maybe you don't, and so you can't ignore it ;)
     
  48. djfrail

    djfrail

    Joined:
    Jan 16, 2014
    Posts:
    124
    Thank you(s)
     
    PygmyMonkey likes this.
  49. Filein

    Filein

    Joined:
    Oct 23, 2014
    Posts:
    7
    It's a solution to use proguard for building android with the AdvancedBuilder?
     
  50. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    No, Advanced Builder only supports the default Unity build settings, but allows you to setup multiple configurations for these.
     
    PygmyMonkey likes this.