Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Switching between platforms takes too long... still.

Discussion in 'Editor & General Support' started by Ted-Brown, Sep 25, 2017.

  1. Ted-Brown

    Ted-Brown

    Joined:
    Oct 16, 2012
    Posts:
    32
    I've been using Unity for six years, and it still has to re-import everything when switching between platforms.

    1. Why isn't there an option to maintain multiple libraries?

    2. If this is a "pain point" for a paid service, can Unity please be open about that? And what service is it?

    3. Is there an official "best way" to NOT have to re-import everything that does not require pushing builds to the cloud?

    thanks
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    This is a significant irritation for me. What bugs me even more is when I switch from standalone Windows x86_64 to Linux it defaults to Linux x86 and starts the update immediately. Then I have to wait for that to complete before I can switch Linux to x86_64 and start it over again.

    My project is fairly large, and the process of getting from Win x86_64 to Linux x86_64 takes about 80 minutes on my laptop and about 35 minutes on my higher end desktop.
     
  3. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    I believe they are working on fixes for this, but it involves an overhaul of the whole import pipeline. They mentioned it in a few Unite talks from the recent years.

    You can use a local cache server, or maintain multiple copies of your project (per platform). I do both.
     
  4. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,204
    As of now, the only viable way to deal with several platforms is to have multiple versions of your project checked out on disk, and to use version control to pull/push changes between them,

    Or I guess you could use cloud build?
     
  5. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,020
  6. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    You also should download, install and use the cache server for your version of Unity. It still takes a long time to switch the first time you switch platforms, but it caches that compilation information in the cache server and makes subsequent platform switches much faster.

    https://unity3d.com/get-unity/downl...237.695510854.1506342669-348635746.1499370804

    Click the "Downloads" dropdown for either Win or Mac and download the Cache server... do this for the Unity version you're using for development.
     
  7. CswiedlerTrion

    CswiedlerTrion

    Joined:
    Dec 6, 2014
    Posts:
    15
    We deal with this by creating 'shadow' projects parallel to the main Unity folder, with symlinks to the Assets subfolder. The main project can switch to any target, though generally I keep it at Win64, and the shadow projects are each set up for a separate target (Win65, PS4, XBoxOne). The biggest annoyance is that Unity's Perforce integration won't handle the symlink, but we usually do all of our 'actual' work in the main project and only use the others for building or testing specific things.
     
  8. Shizola

    Shizola

    Joined:
    Jun 29, 2014
    Posts:
    446
    why aren't you pushing to a cloud?
     
  9. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    The cloud is not a solution for this. I usually want to test fixes locally first (in the editor). many things can be implemented and verified in the editor itself, without the need to run on an actual device.
     
    Ted-Brown likes this.
  10. Ted-Brown

    Ted-Brown

    Joined:
    Oct 16, 2012
    Posts:
    32
    This is actually the basic solution I'm thinking about, and it's much simpler than my idea for implementation!

    I was thinking of writing a script that would handle switching the build target in Unity, and firing off a script to change the Library symlink to the appropriate folder.

    But having separate projects per platform (e.g. app_ios, app_android) makes sense.

    Have you run into any issues with GUID weirdness or meta file problems?
     
  11. Ted-Brown

    Ted-Brown

    Joined:
    Oct 16, 2012
    Posts:
    32
    I will investigate this, Dustin, thank you!
     
  12. fau7

    fau7

    Joined:
    Jan 24, 2018
    Posts:
    48
    It has been 2 hours already.. And just about 40%... There is no meter or projection statistics.. If there were a projection about left time then I needed not to wait in front of the screen all this time.. Frustrating.. I wish the there will be approximate time left for switching platforms and build times for a project in the next releases... Does not need to be 100% accurate..
     
  13. bobisgod234

    bobisgod234

    Joined:
    Nov 15, 2016
    Posts:
    1,042
    It takes about 6 hours to switch here. We set up a remote asset cache server, and it seems to be working (its like 80gb now, and the log file seems to show it is downloading assets from there), but it still takes the same amount of time.

    At this point, we just leave it switching overnight.
     
  14. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    12,948
    A streamlined solution for this would be amazing to have for sure
     
  15. Lauris48

    Lauris48

    Joined:
    Jun 4, 2019
    Posts:
    6
    It took me 10 hours or so to switch project. I don't remember that happening before 2019 versions. I am building for Windows, but needed to do a test for Android. After I am done, ¬10 minutes I have to switch back. I guess another day of waiting. (actually took 10 minutes the second time)
     
    Last edited: Oct 24, 2019
  16. faulknerj

    faulknerj

    Joined:
    Sep 27, 2018
    Posts:
    1
    I found Windows Defender usage tends to spike for me when switching or doing IL2CPP builds. so I just disabled it for now. I found this out because google searchs found the docs even mention that pausing windows defender or other anti virus software with IL2CPP builds increased build times by 50%. it's possible it also affects switching platforms.
     
    Joe-Censored likes this.
  17. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,204
    Yeah, you should add your project folder to exceptions. That's pretty much the first thing we do when we start a new project.
     
    Joe-Censored likes this.
  18. kushG

    kushG

    Joined:
    May 25, 2017
    Posts:
    22
    I usually have a git repo(let's name it "Android Repo") for the project with platform set to Android. Then I clone this git repo in another folder (named "iOS Repo") and set the platform to iOS. Most of my development happens in Android platform and I commit pretty frequently on this repo. Now, If I have to make a build on IPhone, I can simply pull all the commits in cloned repo(iOS Repo) without having to switch platforms. Git pull is almost instant and saves a lot of time
     
    smritichopra3 likes this.