Search Unity

Unity threads

Discussion in 'Editor & General Support' started by Omar Rojo, Feb 9, 2009.

  1. Omar Rojo

    Omar Rojo

    Joined:
    Jan 4, 2007
    Posts:
    494
    I was wondering how many threads a Unity application has ?

    And what about coroutines ? are keep in the same thread ?

    What could be a situation in where more than one thread could be present at the same time in the same app run ?

    .org
     
  2. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    All your script functions (including coroutines) are executed on the same thread.

    If you want to manually use more threads, you can do that (create .NET threads), but be aware that Unity API is not thread safe.
     
  3. Omar Rojo

    Omar Rojo

    Joined:
    Jan 4, 2007
    Posts:
    494
    Thanks Aras

    Its exactly the answer i was expecting

    .org