Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by tuannv793 · Mar 03, 2018 at 10:13 AM · compilescript loading

Script compile take so long time

Hi everyone,

After i change a script and return Unity Editor, it takes so long time to finish recompile the script. It takes about 2 minutes, this is terrible.

I dont know when i get this trouble, maybe after i update new version of Unity IAP then it alert need update something then i click "Go Ahead".

this Unity Editor log when i recompiling the script. It stuck at "Starting compile Library/ScriptAssemblies/Assembly-CSharp.dll" for a long time, about 2 minutes.


Refresh: detecting if any assets need to be imported or removed ...

Hashing assets ... 0.002 seconds file open: 0.000 seconds (2 files) file read: 0.002 seconds (0.003 MB) hash: 0.000 seconds ----- Compute hash(es) for 1 asset(s).

Refresh: elapses 0.489672 seconds Updating Assets/Scripts/GameController/DialogController/RankingDialog.cs - GUID: cbc9af290c43947ffa2233d136cbe177... done. [Time: 65.871205 ms] Refreshing native plugins compatible for Editor in 2.57 ms, found 2 plugins. Preloading 1 native plugins for Editor in 0.41 ms.

----- Total AssetImport time: 0.473855s, AssetImport time: 0.355585s, Asset hashing: 0.002086s [2.9 KB, 1.365381 mb/s]

  • Starting compile Library/ScriptAssemblies/Assembly-CSharp.dll

-----Compiler Commandline Arguments: Filename: /Applications/Unity2017/Unity.app/Contents/MonoBleedingEdge/bin/mono Arguments: '/Applications/Unity2017/Unity.app/Contents/MonoBleedingEdge/lib/mono/4.5/mcs.exe' @Temp/UnityTempFile-fb6ecf7e66ae44152851b203d443c3ff index: 85 Responsefile: Temp/UnityTempFile-fb6ecf7e66ae44152851b203d443c3ff Contents: -debug -target:library -nowarn:0169 -langversion:4 -out:'Temp/Assembly-CSharp.dll' -unsafe -r:'/Applications/Unity2017/Unity.app/Contents/Managed/UnityEditor.dll' -r:'/Applications/Unity2017/Unity.app/Contents/Managed/UnityEngine.dll' -r:'Library/ScriptAssemblies/Assembly-CSharp-firstpass.dll' -r:'/Applications/Unity2017/Unity.app/Contents/UnityExtensions/Unity/Advertisements/UnityEngine.Advertisements.dll' -r:'/Applications/Unity2017/Unity.app/Contents/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll' -r:'/Applications/Unity2017/Unity.app/Contents/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll' -r:'/Applications/Unity2017/Unity.app/Contents/UnityExtensions/Unity/TestRunner/UnityEngine.TestRunner.dll' -r:'/Applications/Unity2017/Unity.app/Contents/UnityExtensions/Unity/TestRunner/net35/unity-custom/nunit.framework.dll' -r:'/Applications/Unity2017/Unity.app/Contents/UnityExtensions/Unity/Timeline/RuntimeEditor/UnityEngine.Timeline.dll' -r:'/Applications/Unity2017/Unity.app/Contents/UnityExtensions/Unity/UnityAnalytics/UnityEngine.Analytics.dll' -r:'/Applications/Unity2017/Unity.app/Contents/UnityExtensions/Unity/UnityHoloLens/RuntimeEditor/UnityEngine.HoloLens.dll' -r:'/Applications/Unity2017/Unity.app/Contents/UnityExtensions/Unity/UnityPurchasing/UnityEngine.Purchasing.dll' -r:'Assets/FacebookSDK/Plugins/Facebook.Unity.dll' -r:'Assets/FacebookSDK/Plugins/Settings/Facebook.Unity.Settings.dll' -r:'Assets/Plugins/Photon3Unity3D.dll' -r:'Assets/Plugins/UnityChannel/ChannelPurchase.dll' -r:'Assets/Plugins/UnityChannel/UnityStore.dll' -r:'Assets/Plugins/UnityPurchasing/Bin/Editor.dll' -r:'Assets/Plugins/UnityPurchasing/Bin/Purchasing.Common.dll' -r:'Assets/Plugins/UnityPurchasing/Bin/Stores.dll' -r:'Assets/Plugins/UnityPurchasing/Bin/Apple/Apple.dll' -r:'Assets/Plugins/UnityPurchasing/Bin/Facebook/FacebookStore.dll' -r:'Assets/Plugins/UnityPurchasing/Bin/Security/live/Security.dll' -r:'Assets/Plugins/UnityPurchasing/Bin/Tizen/Tizen.dll' -r:'Assets/Plugins/UnityPurchasing/winrt/winrt.dll' -r:'Assets/Plugins/WebSocket/websocket-sharp.dll' -r:'Assets/UnityAssets/AmplifyColor/Plugins/AmplifyColor.dll' -r:'Assets/UnityAssets/AstarPathfindingProject/Plugins/Clipper/Pathfinding.ClipperLib.dll' -r:'Assets/UnityAssets/AstarPathfindingProject/Plugins/DotNetZip/Pathfinding.Ionic.Zip.Reduced.dll' -r:'Assets/UnityAssets/AstarPathfindingProject/Plugins/Poly2Tri/Pathfinding.Poly2Tri.dll' -r:'Assets/UnityAssets/JsonDotNet/Assemblies/Standalone/Newtonsoft.Json.dll' -r:'/Applications/Unity2017/PlaybackEngines/iOSSupport/UnityEditor.iOS.Extensions.Xcode.dll' -r:'/Applications/Unity2017/PlaybackEngines/iOSSupport/UnityEditor.iOS.Extensions.Common.dll' -define:UNITY_5_3_OR_NEWER -define:UNITY_5_4_OR_NEWER -define:UNITY_5_5_OR_NEWER -define:UNITY_5_6_OR_NEWER -define:UNITY_2017_1_OR_NEWER -define:UNITY_2017_1_1 -define:UNITY_2017_1 -define:UNITY_2017 -define:UNITY_PURCHASING -define:UNITY_ANALYTICS -define:UNITY_ADS -define:ENABLE_AUDIO -define:ENABLE_CACHING -define:ENABLE_CLOTH -define:ENABLE_GENERICS -define:ENABLE_PVR_GI -define:ENABLE_MICROPHONE -define:ENABLE_MULTIPLE_DISPLAYS -define:ENABLE_PHYSICS -define:ENABLE_RUNTIME_NAVMESH_BUILDING .....................................

Please help me, i can working with this trouble :(

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Xarbrough · Mar 03, 2018 at 11:51 AM

How many scripts are in your project (including 3rd party products and Standard Assets)? If your project is big (hundreds of files) it's normal that compilation takes a while. Now think of those poor programmers who waited 20 minutes for their C++ code to compile a few years back working on giant pieces of software. ;)

You can reduce compilation times by splitting your code into multiple assemblies, which can be compiled on their own. In the past this was possible in a limited way via special folders like Plugins vs Editor, but in the current Unity version we can use Assembly Definition Files.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image tuannv793 · Mar 03, 2018 at 01:11 PM 0
Share

Hi, thanks for your answer. $$anonymous$$y project has about 200 scripts, but this trouble happened after I import new Unity IAP (after i updated Unity IAP, it alert that need update API, then i click "Go Ahead"). And the nightmare started here :(. $$anonymous$$aybe the updating API causes this trouble?

avatar image Xarbrough tuannv793 · Mar 03, 2018 at 02:09 PM 0
Share

Are you getting any new errors when you recompile now? $$anonymous$$aybe the automatic API updater is running every time (although it shouldn't), but I haven't seen this issue anywhere yet. If you had much faster compile times before updating and then very slow compile times right after it would indeed be strange. To double check you could revert the entire project in source control and see if that is the case. From experience I'd say it's still more likely that the slow compilation is normal. Looking at your log I can see that you're using several 3rd party plugin. That alone can take a while to compile if for some reason the Plugins assembly needs to be recompiled. This would be the case if the Unity API updater changed code when updating. So again, if this seems to be happening every time you compile now, it would explain the issue and would be some interesting new bug of the updater. You could try running the updater manually though and then check again by changing a script in your regular non-plugins assembly. Just in case I would also try to get rid of any warnings in the console by fixing them manually.

avatar image
1

Answer by tuannv793 · Mar 04, 2018 at 07:48 AM

Thank you so much for your suggestions! I've tried to create a new project. Copy everything in assets folder to the new project, but the Scripts folder i copied from old version (which have not updated by API updater) and it does not get this trouble, but when i copy Script folder from the newest version (which have updated by API updater) then i get this trouble again. Maybe API Updater has updated something in my scripts and cause this trouble.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

76 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Call function after script compilation? 2 Answers

cookie light and mesh problems on compile to iOS 1 Answer

Determine WHAT was just compiled........ 1 Answer

[SOLVED] Compiled game size 1 Answer

Can i import already compiled code into Unity and then call functions in it? 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges