Search Unity

Feedback Multithreading?

Discussion in 'Editor & General Support' started by astromedia-only, Apr 16, 2020.

  1. astromedia-only

    astromedia-only

    Joined:
    May 13, 2014
    Posts:
    25
    Hi,
    i would like to ask if there is some chance with those huge changes to rendering, building and so if you are considering making Unity not run in single thread? It is one of main things negatively impacting the experience with Unity - if you do anything you have to wait for it to complete before doing anything else and UI is frozen the whole time and lets be honest - UI is not supposed to freeze while program is working in no modern application. In my opinion it would be huge improvement. I was also solving some problem when external plugin was causing whole Unity to crash which if i understood correctly was kinda impossible to handle in better way as well with Unity running in single thread at the moment. Any possitive news about that? :)
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,732
    Have you looked into our Entity Component System?
    Also, various things in Unity are multithreaded under the hood as well as you can do multithreaded work in your scripts, just mst of Unity APIs can only be called from main thread.
     
    Joe-Censored likes this.
  3. astromedia-only

    astromedia-only

    Joined:
    May 13, 2014
    Posts:
    25
    I saw it somewhere introduced but did not looked into it yet ... i will have a closer look, thanks.
    I see, i thought it will be probably more complex - some things seemed multithreaded. Tho hopefully you will figure out how to fix those hang ups and freezes during some tasks whatever real cause is then - UI should be responsive at all times after all :)
    Thanks for response and clarification - i had only info from QA team that "unity runs in single thread" and from my experience it seemed so ... its good to realize its not the whole picture.
     
  4. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Are you sure it is multithreading that is the issue? What are these "if you do anything you have to wait" that you are specifically referring to?

    Are you talking about lag just getting a menu to pop up? Are you talking about when you move something within your scene? Are you talking about when you edit code and return to the editor? What exactly are you talking about? Also, are you sure you have a fast enough computer for the size of the project you are attempting?

    For example, if you move something in your scene and "have to wait", you probably have auto-generate lightmap baking still enabled (default setting). Just uncheck the box in the lighting window. Nothing to do with single vs multithreading - in fact the CPU lightmap baking is probably the most multithreaded feature of Unity since it can easily max out all your cores making everything else feel sluggish. This is probably the first setting I change in any new project.
     
  5. astromedia-only

    astromedia-only

    Joined:
    May 13, 2014
    Posts:
    25
    Mostly importing packages, doing code changes and adding into project folder stuff from outside i suppose (i probably forgot something). I was lately also using more things like "reimport packages" (because package manager is not much stable and sometimes it stops working properly completely and i need to restart Unity altogether), that thing to upgrade materials from regular to hdrp and so. And as you mentioned that lightmap baking - i was havng autogenerate on before also but now im turning it off every time - im not even sure why there is option like that because it seems it constantly interrupts work no matter how powerfull computer i have :D
     
  6. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Is your project on an old fashioned spinning HDD or something?

    Auto generate I'd much prefer to be disabled by default, but it is enabled by default so the feature "just works" for new users without having to investigate what lightmap baking is.
     
  7. astromedia-only

    astromedia-only

    Joined:
    May 13, 2014
    Posts:
    25
    Most of the time not as far as i know :) ... But i often "juggle" with packages and files + different versions of Unity and sometimes weird things happens i suppose.