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. yogergames

    yogergames

    Joined:
    Oct 4, 2016
    Posts:
    13
    Hi,

    I'm trying to use custom build script to exclude some folders from build on certain platforms.

    What I want to do is to exclude filed for GooglePlayGamesServices from build when building for Amazon or iOS. After reading https://docs.unity3d.com/Manual/SpecialFolders.html I've been trying to rename / move folders to match the "Hidden assets" section. But I can't get it to work.

    Has anyone here done that already and can give me some pointers?

    I've been trying the below in OnPreBuild (reverting in OnPostBuild)
    AssetDatabase.MoveAsset("Assets/Plugins/Android/libs", "Assets/Plugins/Android/.libs")
    AssetDatabase.MoveAsset("Assets/Plugins/Android/libs", "Assets/Plugins/Android/libs~")
    AssetDatabase.MoveAsset("Assets/Plugins/Android/libs", "Assets/Editor/tmp/libs")
     
  2. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hello!

    I never tried using the SpecialFolders thing sorry. Have you tried in a small empty project to build to see if it really works as intended?
    One folder that is absolutely 100% sure not to be included in builds is a folder called "Editor". So maybe create one wherever you want in Assets/ and move everything inside.
     
  3. yogergames

    yogergames

    Joined:
    Oct 4, 2016
    Posts:
    13
    I tried that as well, but it didn't work. I'll test again with an empty project.
     
  4. yogergames

    yogergames

    Joined:
    Oct 4, 2016
    Posts:
    13
    Ok, the problem was caused by me using incorrect method.
    FileUtil.MoveFileOrDirectory should be used.

    For the actual issue at hand I still haven't been able to reduce build size though (works for regular assets though). Will look into it further.
     
    PygmyMonkey likes this.
  5. StefanoCecere

    StefanoCecere

    Joined:
    Jun 10, 2011
    Posts:
    210
    not fully compatible with Unity 5.6 (since it introduces two new platforms: Facebook and Switch) easy to fix but please, 5.6 is a released version!
     
  6. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hello and sorry. I was having some vacations!

    Advanced Builder does not support every platform that are supported by Unity (there is no Playstation, no XBox etc...).
    You want me to add support for Facebook and Switch is that correct?

    The thing is that I have no way to test if things are correct for the Switch since I don't have one.
    And I'll have to check for Facebook to see if there's some particular settings.
     
  7. StefanoCecere

    StefanoCecere

    Joined:
    Jun 10, 2011
    Posts:
    210
    no we don't need the new platforms.. but that Advanced Builder doesn't break if a new Unity version (like 5.6 introduces new ones in the official platforms enum!


     
  8. yogergames

    yogergames

    Joined:
    Oct 4, 2016
    Posts:
    13
    Hi,

    Is it possible to create custom defines in the CustomBuildScript -> OnPreBuild method?
     
  9. yogergames

    yogergames

    Joined:
    Oct 4, 2016
    Posts:
    13
    I didn't get any answer but maybe it is wrong approach.

    So what I'm trying to achieve is to set or remove a certain set of defines based on configuration via Editor script. The idea is to only compile code to handle ad networks, etc. if they are actually configured and enabled.

    How can I modify the custom define list as defined per project configuration in advanced builder?
     
  10. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hey,
    I'm sorry, it's on my TODO list, I'll do that when I can :/
    I haven't forgotten.
     
  11. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hello!

    You should be able to do that in an editor script:
    Code (CSharp):
    1. AdvancedBuilder.Get().getProjectConfigurations().configurationList[0].customDefines = "tsool";
    2. UnityEditor.EditorUtility.SetDirty(AdvancedBuilder.Get());
    I'm not 100% sure it will work, but 99% :)

    PS: Of course, I'm using configurationList[0] here to get the first configuration, but you should write your own logic to find the configuration you want etc...
     
  12. yogergames

    yogergames

    Joined:
    Oct 4, 2016
    Posts:
    13
    It works thanks! But somewhere along the way the default defines stopped working and now I don't know how to get them back. So basically I cannot use the defines DP_GOOGLE_PLAY / DP_AMAZON_STORE anymore.. very annoying.

    Edit: Ok, I actually did import a separate asset that overwrote all defines set by advanced builder. So everything is fine!
     
    Last edited: May 17, 2017
    PygmyMonkey likes this.
  13. alizdesk

    alizdesk

    Joined:
    Mar 26, 2015
    Posts:
    46
    Hi
    is AdvancedBuilder in active development?

    Can it be used to switch to "Link" to different project names in Services Tab?
    For example, i have 1 codebase but 10 different android projects with their names, ads, analytics, in-apps set. I want to use Advanced Builder to build for those 10 projects and Services Tab plays a great role here.

    Whats on roadmap?
    Thanks
     
  14. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,935
  15. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,935
    @PygmyMonkey

    1- Just like you have "OnEveryBuildDone" that gets called end of all the builds, please add one more method that gets called one time in the start of build proccess.

    2- Please also provide Company Name in Release Type.

    3- You have provided method to change icon, however AssetDatabase.LoadAssetAtPath works on only assets inside assets folder. What if i want to point to external files (custom location other than unity project)

    4- and what about changing custom splash image?


    Thanks
     
    Last edited: Jun 14, 2017
  16. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hello,

    Sorry but no, Advanced Builder is not in active development anymore, for the simple reason that it doesn't make enough sales (1-3 per month to be honest) :/

    And no, there is no "link" with thinks in the Service tab sorry. It can have a link only if Unity provides an API to change things in the Services tab (which I don't know of)
     
  17. PygmyMonkey

    PygmyMonkey

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

    1. You can easily add it yourself, simply search for every occurence of OnEveryBuildDone and duplicate the code & rename it to OnFirstBuildStart. If you have issues doing that, please tell me.

    2. I could add that to the list of things to do, but it won't be done soon sorry :/

    3. You simply can't :) Unity won't allow it
    You'll have to copy the file first inside the Assets folder

    4. There is no api to change the "old" splash screen (< 5.6 I think) for now, so I can't do that. And I don't know any API to do that with the new splashscreen tools, so can't do :)
     
  18. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,935
    Does this mean you will keep updating it to work with future versions or too busy to do that?


    I tried changing it but code seems to complex for me, just take a look

    There is only one occurance of EveryDoneBuild and that is in the end of
    PerformBuild function.
    Code (CSharp):
    1. if (advancedBuilder.getAdvancedSettings().customBuildMonoScript != null)
    2. {
    3.    IAdvancedCustomBuild customBuild = (IAdvancedCustomBuild)System.Activator.CreateInstance(advancedBuilder.getAdvancedSettings().customBuildMonoScript.GetClass());
    4.    customBuild.OnEveryBuildDone();
    5. }
    Copying it and adding OnEveryBuildStart is easy but where should i put it, as whole function code seems complex, if u can look at the function PerformBuild and tell me where to put it, it'd be great.
     
  19. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,935
    @PygmyMonkey
    After playing with Advanced Builder, i belive i dont need Company Name.
     
    Last edited: Jun 28, 2017
  20. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,935
    @PygmyMonkey
    It looks like if i intialize a class level variable in PreBuild its not available on PostBuild which means u reuse the same instance of script but recreate new class for every Pre and Post? Is that right or im misssing something.
     
  21. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Too busy to do that :/
    I'll eventually do that when I'll upgrade my own projects to Unity 5.6...

    Just put a customBuild.OnFirstBuildStart(); call before the foreach (Configuration config in configurationList) and this should do it ;)

    I don't understand what you mean :/
    Can you say it again? Thanks!
     
  22. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    @PygmyMonkey Will you be fixing some of the issues with 2017.1?
     
  23. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Yes, but only when I'll upgrade to 2017.1 :/
    Are there a lot? Also, are they preventing you completely to use Advanced Builder?
     
  24. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    There are a couple of deprecated warnings which would be good to get fixed, then there is an issue with some of the Editor GUI Styles which throw warnings all the time, and then there is an issue with not being able to edit the scene list properly.
     
    PygmyMonkey likes this.
  25. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Thanks for reporting!
     
  26. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,935
    PygmyMonkey likes this.
  27. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
  28. Polemus

    Polemus

    Joined:
    Nov 14, 2016
    Posts:
    28
    Is there any way i can specify the full output path?

    I would like to builds to output to D:\Builds\........
     
  29. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hello,

    No it's not possible to do that right now. It's defined to be in a Build folder next to the Assets folder.
    But! You can still use a custom build script to move the build files after each build :)
     
    Polemus likes this.
  30. Polemus

    Polemus

    Joined:
    Nov 14, 2016
    Posts:
    28
    worked like a charm. Thanx
     
    PygmyMonkey likes this.
  31. emorling

    emorling

    Joined:
    Jul 6, 2015
    Posts:
    24
    Is this compatible with 2017.2? I get "Requested build group (2) does not exist" when building with same settings as before.
     
  32. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hello,

    The current version is not, I have to find time to publish an update, sorry...
     
  33. Gnejs

    Gnejs

    Joined:
    Jun 24, 2015
    Posts:
    7
    Just wanted to stop by and say that you might be missing out on some sales due to not supporting the latest version and that the store page itself clearly looks outdated due to the lack of updates. I was considering buying the asset since I could really use the functionality but due to it looking abandoned I decided to look here and since I am on 2017.2 as well I can only decide to not get asset at this time which is too bad since it looks perfect for my needs. :/
     
  34. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hello, this should be fixed with the upcoming release (1.6.0).
    Sorry for that!
     
  35. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Thanks a lot :)
    An update should be available really soon, almost everything is ready!
     
  36. PygmyMonkey

    PygmyMonkey

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

    Version 1.6.0

    - NEW Minimum Unity version is now Unity 5.6
    - NEW Added a custom build callback (OnEveryBuildStart) that is called at the beginning of the first build,
    - NEW Now compatible with Unity 2017,
    - NEW Remove every compatibility check with things < Unity 5.6 (Blackberry, WebGL…),
    - UPDATE Windows x64 is now the default over x86,
    - UPDATE Reactivated the ability to create an eclipse project for Android builds,
    - FIX Fixed issue with setting custom scripting define symbols.
     
    BA_Studio and jGate99 like this.
  37. BA_Studio

    BA_Studio

    Joined:
    Jan 14, 2014
    Posts:
    3
    I don't know how I could manage all my different builds without Advanced Builder.
    Thanks for the update for Unity 2017!
     
    PygmyMonkey likes this.
  38. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Thanks a lot :)
     
  39. PygmyMonkey

    PygmyMonkey

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

    Version 1.6.1

    - NEW Added option to enable headless mode on Linux (in the configuration section),
    - NEW Added two callbacks OnPreApplyConfiguration/OnPostApplyConfiguration that are trigger at the beginning and at the end of applying a configuration (at build time, or when you click on the ‘Apply this config’ button in the configuration section of the Advanced Builder window).
     
  40. unormal

    unormal

    Joined:
    Jan 10, 2012
    Posts:
    65
    Glad to see this getting updates! Great little tool.

    small feature request: I'd love to be able to choose copy the windows PDB files over automatically in my windows builds.
     
  41. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
  42. MythicalCity

    MythicalCity

    Joined:
    Feb 10, 2011
    Posts:
    420
    Hello, great tool!
    Is there a way to change icons and splash images for the different release types? ie; if we make a lite version we would like to use an icon that is specific for that version.
     
  43. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hello, thanks a lot :)

    Here's how to change icons (at the bottom): http://www.pygmymonkey.com/tools/advanced-builder/#tab-1417378865226-3-3
    And sorry for the splashscreen but there is no Unity API to do that.
    The only thing you can do is :
    - in OnPreBuild :
    --- copy your splashscreen somewhere else
    --- copy the splashscreen you want in the exact place and name of the old splashscreen
    - in OnPostBuild :
    --- copy back your original splashscreen where it was

    Hope that helps!
     
  44. io3creations

    io3creations

    Joined:
    May 18, 2015
    Posts:
    11
    It was quite a roller-coaster ride to read the last page whether Advenced Builder is still being continued but it was nice to read that it did. :) Actually, I got it a few month ago but only got around to implementing it now. So far so good.

    There was a typo:
    When I deleted all platforms, it said
    "You need to add at least on platform in the 'Platforms' section"

    In the ReadMe.txt it is mentioned that a build for iOS can only be built on a Mac. There is a Unity asset that can be used on Windows but I guess it couldn't be integrated with your asset.
    https://assetstore.unity.com/packages/tools/utilities/ios-project-builder-for-windows-15522

    I haven't looked into X-Box/PS4 setup and development with Unity yet, but wondered if you had any tips that I could consider for different platforms when writing my code. If it's just simply adding more defines, then that should be fine.
     
  45. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    @PygmyMonkey Could you update to support 2018.1 please. They have changed the BuildPipeline.BuildPlayer method so it does not return a string anymore.
     
  46. helloworldgames

    helloworldgames

    Joined:
    Mar 16, 2017
    Posts:
    60
  47. io3creations

    io3creations

    Joined:
    May 18, 2015
    Posts:
    11
    I tried contacting them via the website but no response. I'll be staying with my current build of Unity but might need to update later. Have you looked at the Advanced Builder asset folder to see if it would be possible to modify it to make it work?
     
  48. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    I have fixed the issue yes, but its only a temp fix.
     
  49. MrMatthias

    MrMatthias

    Joined:
    Sep 18, 2012
    Posts:
    191
    can you add uwp windows 10 platform and an option to replace or strip whitespaces from the buildpath?
     
  50. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Thanks for the typo!
    Will be in the next release :)

    About tips for writing for different platforms, yes I would definitely use defines.
    Maybe even specific script that you attach to some objects in the scene that will directly delete the GameObject (or particles or whatever) that are too big to handle for a particular platform. Or simple script that you attach that will configure your objects based on the platform. So you can keep the platform specific code in separate scripts.