Search Unity

Advanced Builder - Manage multiple versions of your game

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

  1. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    According to the description, this Project Builder takes as input an XCode project directory created from Unity, but as far as I know, you just can't do that on Windows... so how do you give it that as an input?
     
  2. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    I believe Unity will let you build it, just you cant run it. I own that tool, and although I never used it properly it will sign and upload iOS builds for you. Im not sure its really something you would integrate with Advanced Builder, but just another tool in the pipeline for building.
     
  3. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Thanks mimminito!
    Well, if it has an API, after you're done building for Mac with Advanced Builder, you can call their API to sign and upload it to the App Store with their plugin.
     
  4. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    @PygmyMonkey
    Hi, i purchased your plugin long ago but couldnt get time to use it.
    I'm finally coming into a situation where i need something like that, do you still implement feature requests? (I know you are updating it like on August 1st, but what if i want to a feature in it to make my workflow better?)
    Thanks
     
  5. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    @PygmyMonkey
    For example, currently i have an app which will be compiled differently for different clients.
    So what i need is different Resources folder for different clients
    So theoraticlly, i add relevant folders to all releases, then when you start compiling you move that folder to resources folder and then compile, and do that for each release.
    Waiting
     
  6. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hey there!
    I may still accept some feature requests, if they are not too complicated :)

    What you're asking, has been asked a lot already, and there's already a way to do that (yourself).
    AdvancedBuilder gives you the ability to use a custom build script, that will trigger a callback before and after each build (OnPreBuild/OnPostBuild). Here's the documentation: http://www.pygmymonkey.com/tools/advanced-builder/

    So, before each build, you use the OnPreBuild callback to check the client you're building, and inside this callback, you move some Resources folder out of the project. Then your project will build. And finally, in the OnPostBuild method, you put back your Resources folder in the correct location.
    Boom. Done.

    :)
     
    jGate99 likes this.
  7. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    Thanks for your prompt reply,
    Can you please provide that script? As i like many others is not that well versed with code.
     
  8. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Sorry no I can't provide this script, because I don't know the different version of each person, the different folders each person wants to move etc...

    But basically it's something like this:

    Code (CSharp):
    1. public void OnPreBuild(Configuration configuration, DateTime buildDate)
    2. {
    3.     if (configuration.releaseType.name.Equals("yourConfigurationName1")
    4.     {
    5.         Directory.Move(yourResourcesFolder1, pathOutsideOfProject);
    6.     }
    7.     else if (configuration.releaseType.name.Equals("yourConfigurationName2")
    8.     {
    9.         Directory.Move(yourResourcesFolder2, pathOutsideOfProject);
    10.     }
    11. }
    12.  
    13. public void OnPostBuild(Configuration configuration, DateTime buildDate)
    14. {
    15.     if (configuration.releaseType.name.Equals("yourConfigurationName1")
    16.     {
    17.         Directory.Move(pathOutsideOfProject, yourResourcesFolder1);
    18.     }
    19.     else if (configuration.releaseType.name.Equals("yourConfigurationName2")
    20.     {
    21.         Directory.Move(pathOutsideOfProject, yourResourcesFolder2);
    22.     }
    23. }
     
    jGate99 likes this.
  9. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    Wow, you are amazing :)
     
    PygmyMonkey likes this.
  10. dragonfoundry

    dragonfoundry

    Joined:
    Jun 18, 2014
    Posts:
    4
    We're new AdvanceBuilder users, and we're seeing some odd behaviour. When we build using Advanced Builder, some (not all...) sprites on prefabs are loading as the wrong sprite from the sprite sheet on the Mac builds, but loading perfectly correctly on PC builds. This doesn't happen when we manually build for Mac. Is this an issue you've come across before?
     
  11. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hey there,
    Well... welcome :)

    And sorry no, that's not something I ever heard of or experienced :/
    Do you have the same issue when you build just one configuration (when seeing the details of a configuration).
     
  12. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Two new updates are available on the Asset Store (1.5.0 and 1.5.1)!

    1.5.1
    - FIX: Removed Windows Phone 8 support starting Unity 5.4 because Unity stopped supporting it.
    You're supposed to use WSA instead.
    - FIX: Some warnings about Blackberry and WP8 on Unity 5.4

    1.5.0
    - NEW: Improved the way we get the path to the advanced builder folder (it's now automatic).

    I also see that I forgot to include the past release notes on this forum, so here they are :)
    1.4.9
    - NEW: Added a preference window to change the path of the PygmyMonkey folder (see the "Moving the
    'PygmyMonkey/AdvancedBuilder' folder" section in the documentation for more info).
    - FIX: Fixed some issues related to Unity 5.4 or newer

    1.4.8
    - FIX: Really fixed issues with Unity 5.4...

    1.4.7
    - FIX: Fixed issues happening with Unity 5.4 (Removed Blackberry and WebPlayer platforms as Unity
    no longer support them)

    1.4.6
    - FIX: Fixed issue that was happening when you added a release type
     
    Last edited: Sep 20, 2016
  13. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    A new update is available on the Asset Store (1.5.2)!

    1.5.2
    - FIX: Fixed automatically finding the Advanced Builder folder on Windows.
     
  14. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    @PygmyMonkey The latest version is running really slow in the editor, kinda freezes up. Could you look into it please? Tried in 5.4.0, 5.4.1p1 and 5.4.1p2.
     
  15. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hey :)
    Weird, you mean the 1.5.2? Windows/Mac?
     
    soglab likes this.
  16. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Yeah. Its really slow in the editor, very hard to scroll around. Its like it doing a huge amount of updates every frame or something.
     
  17. soglab

    soglab

    Joined:
    Dec 21, 2012
    Posts:
    2
    Hi! Same here as mimminito said.
    - dev platform : windows 10 / unity 5.3.6f1 and unity 5.4.1
    - AB ver. : 1.5.2
    - symtom : after adding android platform, it starts to slow down.
    Thank you!
     
  18. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Have you looked into this? Its a huge issue right now and its getting to the point where its unusable.
     
  19. PygmyMonkey

    PygmyMonkey

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

    Sorry I wasn't available these past few days...
    I've checked and find what was causing the issue! Sorry for that...
    I'm sending a fix to the Asset Store, but in the mean time, you can apply it yourself like so:
     
    soglab, mimminito and hopeful like this.
  20. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Brilliant thanks!!
     
    PygmyMonkey and soglab like this.
  21. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    @PygmyMonkey I have a request for a feature. On Android could you enable a feature in the configuration information to split the application binary? I know we can do this in a custom build script but it would be much easier to enable and disable this in the editor. We do a lot of mobile builds and at times we dont need to split the APK, others we do.

    I have just gone through the code and added it in, would you like me to send it over?
     
  22. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hey :)
    Yes why not, that might be a good addition, thanks a lot!
    I'll try to add it when I can, but I think it'll be next month only :/
     
    mimminito likes this.
  23. dragonfoundry

    dragonfoundry

    Joined:
    Jun 18, 2014
    Posts:
    4
    Emailed this to support, but asking here too in case anyone else has had the same problem:

    When we build for Mac, we see a couple of sprites in our sprite atlas getting corrupted. It's always a sprite or two from a multiple sprite sheet. It's only in the Mac build (we're building on a PC). And it's never more than a few out of the 300+ sprites in the game. We don't see the problem when building a standalone build through the editor, just through Advanced Builder (v1.49). And I really don't want to have to go back to building through the editor!
     
  24. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hey,
    I'm pasting here the same answer I sent you via email :)

    Sorry but I don't know at all what could be happening :/
    - Are you using a custom build script ? If yes, maybe you're doing something in it?
    - Have you tried maybe deleting your Library folder so Unity will reimport everything in your project (might take a while), and maybe that'll fix something that was corrupted?
    - Hum... maybe try just renaming the atlases? It will maybe fix the issue?

    Let me know, and we'll try to think of other things if that does not work...

    Have a great day!
     
  25. PygmyMonkey

    PygmyMonkey

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

    Version 1.5.3

    - FIX Advanced Builder window being laggy…
     
  26. jluki

    jluki

    Joined:
    Aug 11, 2013
    Posts:
    24
    Do you plan to support UWP 10 in the near future? I'm really missing this feature :)
     
  27. ilmario

    ilmario

    Joined:
    Feb 16, 2015
    Posts:
    71
    Hi, I will probably buy Advanced Builder and test it, but I'd hope for an answer to this question before that.

    Thing is, I want to build my game on Android + iOS + WebGL for starters, and WebGL has some limititations, such as not being able to use networking/threading. Problem is that for example Ultimate Mobile is essential for Android and iOS and it contains hundreds of files, many of which use libraries which cant be used with WebGL. Cant build to WebGL if those asset files exist, even if the asset itself is not initialized, activated or integrated in any way into any scenes I'm building. Only way I can build to WebGL is to remove all Ultimate Mobile-files from project.

    It might build if I go through all the files and insert lots and lots of #if !UNITY_WEBGL-statements, but then I would need to refactor (tens?) of thousands of lines of unknown code - not going to happen. I could do it in my own scenes/custom code though. Ultimate Mobile itself is updated very often and I cant/dont want to try to add an endless amount of in the assets code.

    What I really want is to temporarily "deactivate" (or something) the offending UltimateMobile scripts, but only for WebGL.
    So.. how can Advanced Builder help me with that? I dont want to export/import+install the package during every build (it's slow and potentially dangerous). Is there for example a nice and simple way to use the pre/post hooks to move the scripts to some folder temporarily, which is just ignored in (WebGL) builds?

    PS: If you can help me I might also buy your Gif Creator <-- looks useful :)
     
  28. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    You could do that, but you would have to manually write the script to do so. There are Pre/Post build methods that get called which you could move assets/folders during. If you know the folders that you need moved this is quite easy to do using the AssetDatabase API. I have used this before to rename StreamingAssets folders based on which build I am doing so videos for different builds are not included in every build. Worked very well, just have to make sure you get it all setup correctly!
     
  29. ilmario

    ilmario

    Joined:
    Feb 16, 2015
    Posts:
    71
    Ok, thanks for the comment @mimminito.

    So, maybe it could be made to work with the hooks, but I doubt its easy with the amount of files in various locations. I tried to Google which folders Unity skips for build compiling and many sources pointed to /Assets/WebPlayerTemplates. However, that only worked in earlier Unity versions, when webplayer builds were supported. So, it possible all those files would need to be moved entirely outside of Assets/ folder. Im not sure if that works with AssetDatabase API, or performance wise, if moving them back results in reimport etc.

    PS: I bought Advanced Builder and Gif Creator, hope to put them to use in a week or so :)
     
  30. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    You should be able to move them outside of your Unity directory, I'm pretty sure I've done this before. I think you would probably need to get the asset using the AssetDatabase API and then use standard .NET calls to move the assets to a new path.
     
  31. PygmyMonkey

    PygmyMonkey

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

    Sorry for the long time to answer, I was having some vacations...
    I could try adding support for Universal Windows Platform. The "only" problem I can see for now, is that there's nothing in the BuildTarget for UWP? https://docs.unity3d.com/ScriptReference/BuildTarget.html
    Or maybe I'm missing something?
     
  32. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hey :)
    Thanks for buying these 2 assets! That's awesome ;)

    Thanks a lot (again!) @mimminito for helping here!
    Yes, you're totally correct, you'll just need to move folders/files outside of the Assets folder (using System.IO) before WebGL builds, and put them back right after, using the custom pre/post build methods (see documentation here: http://www.pygmymonkey.com/tools/advanced-builder/#tab-1417378865226-3-3).

    And if Ultimate Mobile does not have just one folder under which there's everything... well, you'll have to move not one folder, but multiple folders (and maybe files). I guess you'll have to do that just once, as I think the structure of Ultimate Mobile won't change a lot, but I might be completely wrong and you'll have to update your custom build script if Ultimate Mobile change where things are placed.
    But sorry, I can't think of another solution :/
     
  33. ilmario

    ilmario

    Joined:
    Feb 16, 2015
    Posts:
    71
    Thanks for the additional info.

    Actually I've now managed to build just fine on WebGL with UltimateMobile, didn't have to move files anywhere. In the end I found out the problem was probably a corrupted scene which just made UltimateMobile seem the problem. So currently I dont need a separate script for that.

    BUT HEY... another entirely different thing: what do you think about this relatively new asset named Turbo Platform Switch . Documentation here. I just started using it because switching between different platforms was just too slow and currently I cant/wont use Unity's assets cache server. Its advertised to make switching up to 50x faster, and actually seems to work well so far.

    However, it does the switching by turning restarting Unity and, copying/renaming cached files/folder depending on platform and then returns to Unity. I'm not sure if that can be made to work with advanced builder.. What do you think?
     
  34. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Well, great news for you :)

    Hehe, I've actually talked with the guy who made this tool, months before he made it, and he recently sent me an email, asking if it was possible to be cross-compatible :)
    I didn't get a chance to take a look for now, but I'll do it for sure and let you know :D

    But if it's restarting Unity, for sure it won't work with Advanced Builder. We'll see :)
     
    ilmario likes this.
  35. ilmario

    ilmario

    Joined:
    Feb 16, 2015
    Posts:
    71
    Heh, that's a nice coincidence. He did not put me up to ask you about this you know :D

    I would imagine my workflow improving a lot if advanced builder and Turbo Platform Switch work together. And not just me, I mean that would be probably even better than what Unity cloud build offers (for one-man-shows at least). Something many people would want. People will be like
    ->
     
    Last edited: Oct 26, 2016
    PygmyMonkey likes this.
  36. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Ahah, more than true :)
    I once tried to be compatible with Fast Platform Switch (I think the name is correct), but it was way to complicated to get it to work with Advanced Builder, and the author never answered me so...
     
    ilmario likes this.
  37. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    @PygmyMonkey @ilmario Although these assets are great, there is an official Unity alternative. Its the Cache Server, which you can install locally. This will let you switch between platforms incredibly quickly after initial imports and caches everything for you. And in 5.5 they are building this into the Editor so you can just enable it :)
     
    PygmyMonkey likes this.
  38. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Didn't know about the built-in in 5.5, great to know!
    But do you think it has the same performances as Turbo Platform Switch etc...? I'll ask the guy :)
     
  39. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Not sure about performance, but I think im going to stick with Cache Server for now as its supported by Unity at least. TPS is pretty cheap though so worth giving it a go.
     
    PygmyMonkey likes this.
  40. jluki

    jluki

    Joined:
    Aug 11, 2013
    Posts:
    24
    In Unity Build Settings one could choose the UWP 10 SDK. I guess it has something to do with the WSASDK enumeration (https://docs.unity3d.com/ScriptReference/WSASDK.html)
    Hope this helps :)
     
  41. KupoMog

    KupoMog

    Joined:
    Feb 14, 2013
    Posts:
    1
    I'm using the latest Advanced Builder release and have gotten a ton of mileage out of it! I was hoping to generate a Google Android project via Advanced Builder, but noticed that the option is not currently supported. I'd love to see this functionality in the next release.

    The Android platform has a build option in Unity to generate a Google Android project instead of building an APK. This option can be found on the Build Settings window if Android is the selected platform.

    According to the Unity scripting reference, there is a BuildOptions flag that will allow a Google Android project to be exported when it is set to true: https://docs.unity3d.com/ScriptReference/BuildOptions.AcceptExternalModificationsToPlayer.html

    I notice that this BuildOptions flag is currently utilized for iOS configurations to allow XCode projcets to be appended, but the option is not available for Android configurations. It would be great to have this option exposed in the Android configuration to allow users to export their Android project or to build an APK.
     
  42. PygmyMonkey

    PygmyMonkey

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

    Well, the code for this is already here, but it's commented.
    But I can't remember why I disabled it...

    If you can try it (see image below) and tell me if it's working as expected. I'll add it for a future release :)
     
  43. PygmyMonkey

    PygmyMonkey

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

    Version 1.5.4

    - NEW Added buildNumber to the Product Parameters section that will automatically increment with each build! You can access it at runtime if needed via AppParameters.Get.buildNumber
    - UPDATE configuration.getBuildDestinationPath now takes productParameters as the last parameter, before that, it was productParameters.bundleVersion.
    - FIX Fixed Unity 5.5 errors caused by obsolete BuildTargetGroups when building.
     
  44. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    @PygmyMonkey


    Is it possible to exclude GameObjects from certain platform builds with this asset. Similar to how adding an EditorOnly tag, discards GameObjects for all builds?
     
    Last edited: Jan 13, 2017
  45. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hello!

    You could do that, but you'll have to write some code yourself to do that.
    You'll use Advanced Builder OnPreBuild/OnPostBuild callbacks (doc here: http://www.pygmymonkey.com/tools/advanced-builder/#tab-1417378865226-3-3). In the OnPreBuild method, you'll simply use the Unity API to open a scene, search for some GameObjects, remove them, save the scene and you're done :)
     
  46. yogergames

    yogergames

    Joined:
    Oct 4, 2016
    Posts:
    13
    Hi,

    I'm just starting to use AdvancedBuilder. Such a great asset!
    One thing I haven't figured out yet though is how to update the AppParameters?

    Can someone tell me how?
     
  47. yogergames

    yogergames

    Joined:
    Oct 4, 2016
    Posts:
    13
    Wow, it was totally obvious. Missed the Apply configuration button completely.
     
  48. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Hey!

    Well, glad you find out!
    It's also automatically "applied" when you make a build (or multiple builds) :)
     
  49. Hexodust

    Hexodust

    Joined:
    Nov 21, 2016
    Posts:
    10
    I tried to implement this fix but unfortunately it seems to have no effect. Instead of Eclipse Project the build is producing an APK file. Which is bad news for me because my client wishes to have the project to be able doing the app signing and some modifications by himself. I using Unity 5.4.3x I really wish there would be a fix to this problem. Without it I'm doomed to bild it manually ;(

    I just wrote this small script that should do the same - and this one works fine and builds an Eclypse Project as intended. So I assume there must be something in your code...

    Code (CSharp):
    1. using UnityEditor;
    2. using System.Collections;
    3.  
    4. public class CustomBuilder {
    5.  
    6.     [MenuItem("Build/CustomBuild")]
    7.     public static void MyBuild()
    8.     {
    9.         var originalScenes = EditorBuildSettings.scenes;
    10.  
    11.         BuildPipeline.BuildPlayer(originalScenes, "PlayerBuildTest",
    12.         BuildTarget.Android, BuildOptions.AcceptExternalModificationsToPlayer);
    13.  
    14.     }
    15. }
    16.  
     
    Last edited: Feb 20, 2017
  50. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    I already answered to you via email, but I post this here for others until the new update is available :)