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

Ways to improve script compile times

Discussion in 'iOS and tvOS' started by Gamieon, Nov 27, 2011.

  1. Gamieon

    Gamieon

    Joined:
    Mar 20, 2010
    Posts:
    38
    I have a project with 118 scripts; only 25 of which are more than 5 kilobytes. Whenever I change a script, Unity takes about 8 seconds to compile everything after I save it.

    Here are the specs for my 13-inch Mid 2010 Macbook (you may stop laughing now). Using Mac OS X 10.7, 2.4 Ghz Intel Core 2 Duo processor, and 2 GB of ram.

    Aside from moving the project to better hardware, what can I do to improve the compile time?


    (p.s. I'd like to improve the Build Run time too, but want to keep this thread focused on just compiling)
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    See here (step 3 in particular).

    --Eric
     
  3. Gamieon

    Gamieon

    Joined:
    Mar 20, 2010
    Posts:
    38
    "...if you want to reduce compile times, put scripts that seldom change into group 1 [All scripts in "Standard Assets", "Pro Standard Assets" or "Plugins" are compiled first.] and scripts that change a lot into group 3 [All other scripts outside "Editor" are compiled next.]"


    You rock...next time I'll put on my reading glasses before I use Google :)