Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Advanced Builder - Manage multiple versions of your game

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

  1. phoenixrising

    phoenixrising

    Joined:
    Aug 9, 2013
    Posts:
    57
    I have a question but first I was able to fix my null exception bug by setting the information directly into the AdvancedBuilder.asset by using the inspector, then the null exception goes away!

    question: once upon a time, you had an example script where we would do the customizations inside the on prebuild methods, and it showed how to figure out which configuration you were building. Say, I want to put custom prebuild differently for demo and full release builds, How can I tell what the name of the release I am building is?


    publicvoidOnPreBuild(Configurationconfiguration, System.DateTimebuildDate)
    {
    AdvancedBuilderadvancedBuilder = (AdvancedBuilder)AssetDatabase.LoadAssetAtPath("Assets/PygmyMonkey/AdvancedBuilder/Editor/AdvancedBuilder.asset", typeof(AdvancedBuilder));

    string NameOfRelease=???

    switch(NameOfRelease){
    case ("Demo"):
    break;
    case ("Full"):
    break;
    }
    }


    Or a suggestion for the future possibly: add a custom build script per configuration!
     
  2. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hi!

    Yes the way of doing that changed, now everything is inside the Configuration class.
    So to get the name of the release for example, you just have to do : configuration.releaseType.name
    That's it :)

    You can also get the platform type: configuration.platformType
    The distribution platform, the architecture, the texture compression etc... ;)
     
  3. Kaemalux

    Kaemalux

    Joined:
    Aug 1, 2013
    Posts:
    45
    Hello!
    I am very interested in this asset, mostly for one feature: i need to set up a finished build for MAC OS, but i am totally getting lost with all changes / mods i have to perform... Can this Builder help me with minimal effort, or should i still take the long way to upload a game on Mac App Store?
    Thanks in advance,
    have a nice day!
     
  4. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hey there!

    Yes Advanced Builder will allow you to set all the configurations you want once, and then build each configuration whenever you want.
    It also depends on the changes you want to perform, are they custom? Or are they simple things like package name, product name etc...?
    If they are not simple, you can just create a custom build script (more on this here) that will do whatever you want depending on the configuration (platform, architecture etc...) before and after each build. So you just have to do that once and it will be used every time you build.

    There is no direct way to publish to the Mac App Store with Advanced Builder, it will 'just' create a Mac build with all the configuration option you specified.

    If you need more info, please ask ;)

    Have a great day!
     
  5. Kaemalux

    Kaemalux

    Joined:
    Aug 1, 2013
    Posts:
    45
    Thanks a lot for the explanation!

    Yes, i just want simply builds. Of course, i understand that i have to do some integrations to submit the product to Mac App Store, but i would like to reduce the process at the minimum, as for my competences it is really painful. :D

    Thanks again, when i purchase your Asset i will post more specific questions. ^^

    Have a nice day!
     
    PygmyMonkey likes this.
  6. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    707
    Advanced Builder got taken down by something really simple:

    The editor window requires that the Bundle Version be in the xx.xx.xx format. That's kind of an arbitrary limit, isn't it? I like to have the date in my version numbers (e.g. 1.150910.1) but entering more than 6 numbers in the Bundle Version field makes the entire Editor window go blank.

    I looked around in the source to try to change it myself, and I found the regex that checked to make sure each section was only two digits long, but the entire Advanced Builder window still goes blank if I do more than 6 digits anywhere in the version.

    I'm really surprised something so simple totally breaks Advanced Builder.


    EDIT: I just noticed this error in the console:
    Looks like it's trying to parse the version as an int32, rather than a string?
     
  7. PygmyMonkey

    PygmyMonkey

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

    Yes it's totally arbitrary to have in in the xx.xx.xx format, but I think this is what used the most and I wanted people to give a "correct" bundle version.

    This is required for the Android platform (and that's why I ask for the xx.xx.xx format). Because every time you upload a new version to the Google Play store, you need to increase the bundleVersionCode from the previous version.

    So in order to do that, Advanced Builder set the bundle version code to:
    Code (CSharp):
    1. int.Parse(deviceFilterNumber.ToString() + textureCompressionAndroid.versionCodePrefix + Regex.Replace(bundleVersion, "[^0-9]", ""));
    With the small doc on top of the method (getAndroidBundleVersionCode in PlatformAndroid.cs):
    /*
    *Format: xxyyzzz
    *xx: Devicefilter number
    *yy: Texturecompression number
    *zzz: BundleVersionnumber(0.3.0->030)
    */

    And the way you set the Android Bundle Version Code is calling PlayerSettings.Android.bundleVersionCode, which is an int (not a string), so you can't have something that is bigger than an int. Which is what you have by specifying a bundle version with the date inside.

    You could comment the line settings the bundleVersionCode for Android and manually updating it in PlayerSettings for each release... but this will make the entire process not automated...

    If you have a solution in mind, I'm all ears :)
     
  8. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    707
    Well, versioning is always a bit of a personal thing. Most everyone does it differently, so I'll just explain how I've been doing it:

    The first number is something that I pretty much never change after the first official release. In other words, I use a 0 during alpha/beta builds and a 1 after official release.

    The middle number is the date of the build/release in yymmdd format.

    The final number is what I also use as the bundle version number. I just increment it by 1 for each build.

    So my current project I'm trying to use Advanced Builder with would be version 1.150910.11 if I were to release a new build today.

    I'd say you could just use the last number as the bundle version number like I do, but that wouldn't work going forward for projects that have already used the old method.

    The only other suggestion I can think of would be to allow a separate entry for the bundle version number. As far as I know it's only required for Android, so it might make more sense as a platform setting rather than in the project settings.

    I also think there's a possible problem with the way you're doing it now by converting the version number to the bundle version like that. Let's say I had a version 1.0.11 which got turned into 1011. But then I made a new release 1.2.0 which would be 120. This is smaller than the previous number and therefore invalid! Yet it's a perfectly reasonable versioning system to use.

    Either way, Advanced Builder needs a bit of sanity checking parsing that string as an integer to prevent PEBCAK errors like this one I encountered. :p I originally thought Advanced Builder had crashed and that even Unity had locked up when I saw the Advanced Builder window go blank.
     
    Last edited: Sep 16, 2015
  9. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Thanks a lot for the feedback.
    You're right for everything :)

    I'll update Advanced Builder when I can so the future release will have a separate Android bundle version code (as an integer) :D
     
  10. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    974
    I'm interested in this asset but I'm wondering how it handles crashing? Unity crashes perhaps 25% of the times when building a game. So if a multiple build is initiated, and crashes, will it retry and continue from last successful build or will it do the whole thing again?
     
  11. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hey there, thanks for the interest ;)

    If Unity crashes, or there's an error during the build process, it will just do... nothing else. Everything will stop, and you'll have to fix things and relaunch the builds yourself.
    There is almost no point relaunching builds when an error has been detected. Because you obviously first need to fix it before launching builds again. Or am I missing something?

    Have a great day!
     
  12. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    974
    It's a Unity problem - sometimes it crashes for no reason at all during build. Though it has been more stable in later releases.

    Anyhow, I purchased this asset and I'm very happy with it. Thanks!
     
    PygmyMonkey likes this.
  13. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    I'm really happy you like it! Thanks ;)
     
  14. imurashka

    imurashka

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

    Can you add $BUNDLE_VERSION and $BUNDLE_IDENTIFIER macroses to the build folder path (also for 'Build file name')?
     
  15. PygmyMonkey

    PygmyMonkey

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

    It's added, will be available in the next update!
    Thanks for the suggestion.
     
  16. Cubic_Creo

    Cubic_Creo

    Joined:
    Oct 13, 2014
    Posts:
    47
    I've been having a problem where if Unity crashes while it's compiling a C# script, then I'm unable to open my project at all again (Unity just crashes) until I remove the PygmyMonkey folder from the Assets folder. Then I open Unity, let it do its thing, then shut it down, move the folder back, and re-open Unity, and then all is good.

    Here's the stack trace from the editor log when this happens:
    ========== OUTPUTING STACK TRACE ==================

    00000001407EF9E3 (Unity) std::_Tree<std::_Tmap_traits<UnityGUID,Asset,std::less<UnityGUID>,std::allocator<std::pair<UnityGUID const ,Asset> >,0> >::find
    0000000140C9DB57 (Unity) AssetDatabaseProperty::DoNext
    0000000140CA6132 (Unity) BaseHierarchyProperty::Next
    00000000176D8CE5 (Mono JIT Code) (wrapper managed-to-native) UnityEditor.HierarchyProperty:Next (int[])
    00000000176D76E0 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\AssetDatabaseSearching.cs:37] UnityEditor.AssetDatabase:SearchAllAssets (UnityEditor.SearchFilter)
    00000000176D7418 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\AssetDatabaseSearching.cs:28] UnityEditor.AssetDatabase:FindAssets (UnityEditor.SearchFilter)
    00000000176D3028 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\AssetDatabaseSearching.cs:21] UnityEditor.AssetDatabase:FindAssets (string,string[])
    00000000176D2EAF (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\AssetDatabaseSearching.cs:11] UnityEditor.AssetDatabase:FindAssets (string)
    00000000176D2AD9 (Mono JIT Code) [C:\Users\Creo\Documents\Projects\Metaware\Cubic\Assets\Editor\PygmyMonkey\AdvancedBuilder\Editor\ProjectConfiguration\ConfigurationSceneRenderer.cs:33] PygmyMonkey.AdvancedBuilder.ConfigurationSceneRenderer:ComputeProjectSceneList ()
    00000000176D2A05 (Mono JIT Code) [C:\Users\Creo\Documents\Projects\Metaware\Cubic\Assets\Editor\PygmyMonkey\AdvancedBuilder\Editor\ProjectConfiguration\ConfigurationSceneRenderer.cs:20] PygmyMonkey.AdvancedBuilder.ConfigurationSceneRenderer:OnReloadScripts ()
    00000000175E0F5E (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
    00007FFF9CB04043 (mono) [c:\buildslave\mono-runtime-and-classlibs\build\mono\mini\mini.c:4914] mono_jit_runtime_invoke
    00007FFF9CA583AD (mono) [c:\buildslave\mono-runtime-and-classlibs\build\mono\metadata\object.c:2623] mono_runtime_invoke
    000000014039AAEF (Unity) scripting_method_invoke
    000000014055A562 (Unity) ScriptingInvocation::Invoke
    000000014055AB27 (Unity) ScriptingInvocation::Invoke<MonoObject * __ptr64>
    0000000140559B8D (Unity) CallMethodsWithAttribute
    0000000140D2707C (Unity) GetApplication
    0000000140555E4A (Unity) MonoManager::EndReloadAssembly
    00000001405579B2 (Unity) MonoManager::ReloadAssembly
    00000001408C29AA (Unity) ReloadAllUsedAssemblies
    00000001408CCA11 (Unity) RecompileScripts
    0000000140909280 (Unity) MonoImporter::GenerateAssetData
    0000000140810F6A (Unity) AssetDatabase::ImportAsset
    000000014081FF86 (Unity) AssetDatabase::UpdateAsset
    00000001408E1EE3 (Unity) AssetInterface::processAssetsImplementation
    00000001408E2BF8 (Unity) AssetInterface::StopAssetEditing
    00000001408E9353 (Unity) AssetInterface::Refresh
    0000000140D3069A (Unity) Application::InitializeProject
    0000000140E472DF (Unity) WinMain
    00000001414DECB0 (Unity) strerror_s
    00007FFFBDF613D2 (KERNEL32) BaseThreadInitThunk
    00007FFFBED25454 (ntdll) RtlUserThreadStart

    ========== END OF STACKTRACE ===========

    Where it says line number 33, it should actually be line number 32, because I added a try/catch around the FindAssets() call. The try/catch didn't help.
     
  17. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hey there!

    Thanks for reporting this, I tried added a null pointer check, hoping this will fix the issue, but otherwise, I have no idea why it causes this :/
     
  18. Cubic_Creo

    Cubic_Creo

    Joined:
    Oct 13, 2014
    Posts:
    47
    Hey thanks. It does seem like it might be a Unity bug somehow.

    Also, I just want to say that even with this minor annoyance, Advanced Builder has been a huge help to my workflow. It used to take me over an hour to build, sign the release, upload to Steam, etc. Now I just click a button and sit back and relax.
     
    PygmyMonkey likes this.
  19. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Awesome, thanks a lot :)
    PS: If you can give a nice rating and a nice comment on the Asset Store, it would help a lot!

    Have a great day.
     
  20. PygmyMonkey

    PygmyMonkey

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

    Version 1.4.3

    - NEW Now requires at least Unity 5.0.0
    - NEW Bundle version can now use the format "xx.xx.xx.xx", instead of just "xx.xx.xx"
    - NEW 'Append project' is now available again for iOS. You can chose to append projects in
    each configuration.
    - NEW You now open Advanced Builder via the menu "Window/PygmyMonkey/Advanced Builder", it was
    previously in "Tools/PygmyMonkey/Advanced Builder".
    - NEW Added support for Windows Store
    - NEW Added $BUNDLE_VERSION and $BUNDLE_IDENTIFIER to set your custom build destination path
     
  21. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    @PygmyMonkey I was wondering if you could help me out with defines. There are various plugins (Everyplay, Vuforia) that set defines through a post process or through editor scripts, but Advanced Builder seems to overwrite these defines when building. Luckily I know what they are, but for some plugins I would have to dig through and find them to add them into the custom defines list. Could you not append all of your defines to the list (checking if there are duplicates)?

    I am using the lastest version from the Asset Store (1.4.3) on Unity 5.2.2p1
     
  22. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hey great idea!
    I just coded that, but there is an issue (and a major one)...

    Say you have 2 configurations, with 2 different custom defines (DEFINE_1 and DEFINE_2).
    If you press 'Apply config' to the first one, you'll have DEFINE_1 in the defines. Perfect.
    But then, when you press 'Apply config' to the second one, as we append, we do not remove DEFINE_1, but we just add DEFINE_2, and maybe we don't want this DEFINE_1 for this second configuration...
    See what I mean?
     
  23. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Could we have an option to toggle this?
     
  24. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    I'll try to add this when I can :)
     
    mimminito likes this.
  25. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hey mimminito =)
    The update with what you asked is waiting approval on the Asset Store!
     
    mimminito likes this.
  26. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Superb! Thanks for this. Ive been caught out multiple times because of this recently, it should be a big help :)
     
    PygmyMonkey likes this.
  27. PygmyMonkey

    PygmyMonkey

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

    Version 1.4.4

    - NEW Added the ‘Let AdvancedBuilder overwrite defines’ option to Build options. When applying a configuration, you can now chose not to overwrite the current custom defines.
     
  28. StefanoCecere

    StefanoCecere

    Joined:
    Jun 10, 2011
    Posts:
    210
    hi @PygmyMonkey
    odd thing (i have my project under Git).. whenever i build a project via Advanced Builder, i see this modification in file Assets/PygmyMonkey/AdvancedBuilder/Resources/AppParameters.asset

    Code (CSharp):
    1.  
    2. -  m_productName: MyGame
    3. -  m_bundleIdentifier: com.mygame
    4. +  m_productName: com.mygame
    5. +  m_bundleIdentifier: MyGame
    6.  

    it seems like to invert m_bundleIdentifier and m_productName
    is it normal?
    the app gets builded right by Xcode but... it sounds od!!
     
  29. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hey there!
    Well, yes this is odd and not normal if that's the case :)
    Are you using a GUI git software or is it from Terminal? If it's a GUI one, can I show the screenshot? Maybe it's the file diff system that makes things look "bad"? Can you otherwise open by hand the modified AppParameter.asset file to see if the content is not correct?

    Thanks!
     
  30. bilke

    bilke

    Joined:
    Jul 13, 2012
    Posts:
    54
    First congrats to this awesome asset! But now a feature request:

    I would like to build one executable for each scene. In theory it already works as I can specify just one scene per project configuration but I cannot modify the build folder path or executable name accordingly. So there should be a new variable for use in the folder path which contains the selected scene(s) from the project configuration. This would make this asset even more awesome!

    Thanks!
     
  31. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Thanks a lot for the compliments!
    And for your feature request: why don't you just create multiple release type? ;)
     
  32. bilke

    bilke

    Joined:
    Jul 13, 2012
    Posts:
    54
    Yes using multiple release types works too. I was asking because if I want to combine scenes as one dimension and e.g. Release / Debug as the other I have to create it in the following manner which seems a bit counter-intuitive: Scene1_Debug, Scene1_Release, Scene2_Debug, ...

    Another question: I would like to run some script after all project configs were built but I noticed that the scripts after each config. I am asking because at the end I want to deploy my builds to some location all at once.
     
  33. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Well yes I can understand this is boring, but this is the fastest way to do that right now, plus it's only once :)

    This is a good idea!
    As it's not available now, just follow this to implement it:




     
    Last edited: Feb 19, 2016
    fidelsoto likes this.
  34. bilke

    bilke

    Joined:
    Jul 13, 2012
    Posts:
    54
    Thanks but again this runs after each build (similar to OnPostBuild). I guess the change in PlatformBuilder.cs has to go into AdvancedBuilder.cs (around line 92).
     
  35. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Oops! You're more than right, sorry!
    I've updated my previous post with the fixes ;)
     
  36. PygmyMonkey

    PygmyMonkey

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

    Version 1.4.5

    - NEW Added OnEveryBuildDone() callback to the custom builds, which is a callback triggered when all the builds are done.
    - NEW Added support for tvOS platform.
     
    mimminito likes this.
  37. bilke

    bilke

    Joined:
    Jul 13, 2012
    Posts:
    54
    I am on 1.4.5 and get the following error when I click on Add Release Type:

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. PygmyMonkey.AdvancedBuilder.ProjectConfigurationsRenderer+<checkWarningsAndErrors>c__AnonStorey24.<>m__7C (PygmyMonkey.AdvancedBuilder.ReleaseType x) (at Assets/PygmyMonkey/AdvancedBuilder/Editor/ProjectConfiguration/ProjectConfigurationsRenderer.cs:295)
    3. System.Linq.Enumerable+<CreateWhereIterator>c__Iterator1D`1[PygmyMonkey.AdvancedBuilder.ReleaseType].MoveNext ()
    4. System.Linq.Enumerable.Count[ReleaseType] (IEnumerable`1 source)
    5. PygmyMonkey.AdvancedBuilder.ProjectConfigurationsRenderer.checkWarningsAndErrors (PygmyMonkey.AdvancedBuilder.ErrorReporter errorReporter) (at Assets/PygmyMonkey/AdvancedBuilder/Editor/ProjectConfiguration/ProjectConfigurationsRenderer.cs:295)
    6. PygmyMonkey.AdvancedBuilder.AdvancedBuilderRenderer.drawInspector () (at Assets/PygmyMonkey/AdvancedBuilder/Editor/AdvancedBuilderRenderer.cs:95)
    7. PygmyMonkey.AdvancedBuilder.AdvancedBuilderWindow.drawCustomGUI () (at Assets/PygmyMonkey/AdvancedBuilder/Editor/AdvancedBuilderWindow.cs:71)
    8. PygmyMonkey.AdvancedBuilder.Utils.PMEditorWindow.OnGUI () (at Assets/PygmyMonkey/AdvancedBuilder/Editor/Utils/PMEditorWindow.cs:94)
    9. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    10.  
    The Advanced Builder window is then blank and cannot be clicked or closed anymore. After restarting Unity sometimes there is a release type added but most often not. Any ideas?
     
    mimminito likes this.
  38. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Ive been getting this for the past few releases.
     
  39. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Thanks a lot to both of you for reporting the issue!
    It will be available in the next update. In the meantime if you want to fix it:

    Open ProjectConfigurationsRenderer.cs, remove the following two if methods:
    Code (CSharp):
    1. - if (m_advancedBuilder.getReleaseTypes().getReleaseTypeList().Where(x => x.bundleIdentifier.Equals(configuration.releaseType.bundleIdentifier)).Count() == 0)
    2. - if (m_advancedBuilder.getReleaseTypes().getReleaseTypeList().Where(x => x.productName.Equals(configuration.releaseType.productName)).Count() == 0)
    And replace with this:
    Code (CSharp):
    1.  
    2. if (m_advancedBuilder.getReleaseTypes().getReleaseTypeList().Where(x => !string.IsNullOrEmpty(x.bundleIdentifier) && x.bundleIdentifier.Equals(configuration.releaseType.bundleIdentifier)).Count() == 0)
    3. {
    4.    errorReporter.addWarning("Be careful, it seems you changed a release type bundle identifier, and your configuration " + configuration.getDescription() + " still uses the old one (" + (configuration.releaseType == null ? "N/A" : configuration.releaseType.bundleIdentifier) + "). To update, please delete the configuration and add it back again (remember to save your custom defines)");
    5. }
    6.  
    7. if (m_advancedBuilder.getReleaseTypes().getReleaseTypeList().Where(x => !string.IsNullOrEmpty(x.productName) && x.productName.Equals(configuration.releaseType.productName)).Count() == 0)
    8. {
    9.    errorReporter.addWarning("Be careful, it seems you changed a release type product name, and your configuration " + configuration.getDescription() + " still uses the old one (" + (configuration.releaseType == null ? "N/A" : configuration.releaseType.productName) + "). To update, please delete the configuration and add it back again (remember to save your custom defines)");
    10. }
    11.  
     
    Last edited: Mar 22, 2016
    mimminito likes this.
  40. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Thanks :)
     
  41. Kelos

    Kelos

    Joined:
    May 27, 2014
    Posts:
    12
    Hi!
    I read in the FAQ that Unity batch mode currently not supported.

    But am i able to launch build from code? Something like that:
    Code (CSharp):
    1. void BuildPlatform1()
    2. {
    3.      AdvancedBuilder.Build("Platform1");
    4. }
     
  42. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hey!

    Sorry, seems like I forgot to update the FAQ, thanks!
    You can first define everything in the Unity Editor how you want, and just use the command line argument like so:
    PATH_TO_UNITY_INSTALLATION/Unity -quit -batchmode -projectPath "PATH_TO_YOUR_PROJECT" -executeMethod PygmyMonkey.AdvancedBuilder.AdvancedBuilder.PerformBuild
    It will do exactly the same thing than pressing the "Perform a total of x builds" button ;)
     
  43. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    @mimminito @bilke I'm sorry, the code I wrote earlier was "bad". I've edited the message to fix that :)
     
    mimminito likes this.
  44. BubbaSevenStudios

    BubbaSevenStudios

    Joined:
    Mar 11, 2016
    Posts:
    2
    Thanks for the great plugin! I've been using it for the last 2 weeks and it is a real time saver.

    I have a few questions:

    1. Is it possible to check if the password for the android keystore was entered before running the build? I don't want to store my password in the project, but I often forget to enter it before hitting build.

    2. Is there a way to make AdvancedBuilder quit after the first failure? I have 5 build configurations, and if the first one fails I have been hitting the esc key a bunch of times in a row to get the rest of the builds to quit.

    3. Why does AdvancedBuilder overwrite all of the entries in scriptingDefineSymbols in ProjectSettings.asset? It looks like each entry is for a different platform. I'm only building android, yet every entry gets overwritten. Not a major issue as long as I remember not to check in the changes to ProjectSettings.assets, but I did waste some time debugging my project after I had checked it in :)

    4. Is there a better (or more standard) way of including different plugins or DLLs for different builds in Unity now? When you answered the question in this forum 2 years ago the best solution was to make a custom script that moved the DLLs out of the project directory for the build. I'm just curious if this process has been improved since then. I am using both Google Play Game Services and Amazon GameCircle, and I've been struggling to get the different plugins to work in the same project but for different builds.
     
  45. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    First, thanks a lot for the compliment :)

    I think the last toggle in the "Build options" section is what you're looking for? :)


    This is a good idea, I've added that to the list of features, but don't know when I'll be able to add that :/

    It's because you can have a lot of different configurations, like Android/GooglePlay, Android/AmazonStore etc... and for each of these configurations, AdvancedBuilder will write some custom scriptingDefineSymbols that will allow you at runtime to check for a particular configuration. In our example, you would have #PT_ANDROID for Android/GooglePlay and Android/AmazonStore, but #DP_GOOGLE_PLAY and #DP_AMAZON_STORE
    So in your scripts, you could do #if DP_AMAZON_STORE etc...
    And AdvancedBuilder need to overwrite the scriptingDefineSymbols located in ProjectSettings before each build for that :)

    Well no sorry, the best process yet is still to write a custom build script that will move things around :/

    Have a great day!
     
  46. BubbaSevenStudios

    BubbaSevenStudios

    Joined:
    Mar 11, 2016
    Posts:
    2
    Yep. That is exactly what I was looking for. Thanks.

    I understand that each configuration can have a different custom defines. That's the main reason I bought AdvancedBuilder :)

    What I was wondering about was all of the entries under scriptingDefineSymbols in ProjectSettings.asset. When I put a B7_* define for a few platforms using the PlayerSettings inspector, I see the following in ProjectSettings.asset.

    scriptingDefineSymbols:
    1: B7_PC
    2: B7_tvOS
    4: B7_iOS
    7: B7_ANDROID
    13: B7_WebGL


    When I build for Android with AdvancedBuilder, every line after scriptingDefineSymbols gets updated with my Android custom defines. I was expecting just 7: to be updated.

    Not a big issue, just more of a curiosity. I have just been reverting changes to ProjectSettings.asset after I build.
     
  47. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    I'm really sorry, but I still don't understand :(
     
  48. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    @PygmyMonkey I am getting errors in Unity 5.4b18 when applying a configuration:
     
  49. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Thanks for reporting!
    I think they forgot to remove BuildTargetGroup.WP8 and BuildTargetGroup.BlackBerry from the BuildTargetGroup enum. I just sent a bug report :)
     
    Last edited: Jun 6, 2016
  50. fidelsoto

    fidelsoto

    Joined:
    Aug 7, 2012
    Posts:
    87