In my project, I decided to switch from the github version of PostProcessing v2 to the one managed by the package manager. I deleted the version of PostProcessing I had copied to my Assets folder and then enabled the PostProcessing 2.0.11 package using Package Manager.
Everything seemed to work, but as soon as I did that I noticed that the compilation spinner never stopped. I looked at Editor.log and saw that Unity appeared to be in a loop doing the same thing over and over. A small snippet of what is repeated over and over is below.
I tried deleting my .vs, Library, and obj folders and also all generated visual studio projects, and then starting Unity. However, when I started Unity, it just went through the asset import process very slowly because it was still stuck in the compilation loop (which I could see interleaved with the asset import process).
I was not able to reproduce the bug using a new project, so I could have some problem with my project I don’t know about. But if anyone has suggestions on how I can stop this I would greatly appreciate it. I’m very confused at the moment.
Pass: 1 took 98 milliseconds
ProcessSitesModule Assembly-CSharp.dll elapsed time:00:00:00.2152639
- Starting compile Library/ScriptAssemblies/Assembly-CSharp-Editor.dll
- Finished compile Library/ScriptAssemblies/Assembly-CSharp-Editor.dll
Reloading assemblies after finishing script compilation.
Begin MonoManager ReloadAssembly
Refreshing native plugins compatible for Editor in 1.82 ms, found 10 plugins.
Preloading 3 native plugins for Editor in 0.23 ms.
Mono: successfully reloaded assembly
Refreshing native plugins compatible for Editor in 1.83 ms, found 10 plugins.
Preloading 3 native plugins for Editor in 0.23 ms.
----- Total AssetImport time: 0.387712s, AssetImport time: 0.000000s, Asset hashing: 0.000000s [0 B, 0.000000 mb/s]
- Completed reload, in 3.330 seconds
Initializing Unity.PackageManager (PackageManager) v2018.2.3 for Unity v2018.2.3f1
Registering platform support modules:
Registered platform support modules in: 0.0244753s.
Native extension for LinuxStandalone target not found
Native extension for WindowsStandalone target not found
- Starting compile Library/ScriptAssemblies/Unity.Postprocessing.Runtime.dll
- Starting compile Library/ScriptAssemblies/Unity.PackageManagerUI.Editor.dll
- Starting compile Library/ScriptAssemblies/UnityEditor.StandardEvents.dll
- Finished compile Library/ScriptAssemblies/UnityEditor.StandardEvents.dll
- Finished compile Library/ScriptAssemblies/Unity.Postprocessing.Runtime.dll
Symbols will be read from Temp\Unity.Postprocessing.Runtime.dll.mdb
Script Module: Unity.Postprocessing.Runtime.dll
Pass: 0 took 22 milliseconds
Pass: 1 took 6 milliseconds
- Finished compile Library/ScriptAssemblies/Unity.PackageManagerUI.Editor.dll
- Starting compile Library/ScriptAssemblies/Unity.Postprocessing.Editor.dll
- Finished compile Library/ScriptAssemblies/Unity.Postprocessing.Editor.dll
- Starting compile Library/ScriptAssemblies/Assembly-CSharp-firstpass.dll
- Finished compile Library/ScriptAssemblies/Assembly-CSharp-firstpass.dll
Symbols will be read from Temp\Assembly-CSharp-firstpass.dll.mdb
Script Module: Assembly-CSharp-firstpass.dll
Pass: 0 took 43 milliseconds
Pass: 1 took 20 milliseconds
- Starting compile Library/ScriptAssemblies/Assembly-CSharp.dll
Note that if, instead of using Package Manager to import Post Processing 2.0.11, I simply drag the PostProcessing folder from AppData\Local\Unity\cache\packages\packages.unity.com\com.unity.postprocessing@2.0.11-preview into my Assets folder, the infinite build loop does not occur.
It is really hard to tell at a distance what is going on :(. Is your project big? I mean, can you try to strip the content of your project and back stuff and see if the error goes aways at some point?
I’ll reach out to the script compilation team to see if they have an idea.
Do you have anything that is triggering the API updater?
I had the API updater cause infinite loops when using the new Incremental Compiler, so I don’t let the API updater to run anymore.
Awesome. You guys nailed it. Turns out the AQUAS water shader had an InitializeOnLoad that was fighting with PostProcessing and it got into this infinite loop. I’ll investigate further on the AQUAS channel (maybe they even have a fix for this right now), but these lines (inside of an AQUAS InitializeOnLoad static constructor) is the culprit:
I didn’t even know there was something like InitializeOnLoad! I really appreciate your quick help on this. Would have taken me a long time to track down on my own.
The one thing that is weird to me is that this does not happen if I just drop in PostProcessing to my Assets folder. It only happens when I import PostProcessing using the package manager. In both cases I was using the same version of PostProcessing. Perhaps something changed regarding the order of the InitializeOnLoad methods when using the package manager version.
An infinite import loop has been detected. The following Assets were imported multiple times, but no changes to them have been detected. Please check if any custom code is trying to import them.
please someone help me to get out of this . i have started a new project in that just if i add burst package or post processing then i am getting the above mentioned error
It’s a bit of a necropost here but, I got the same error just now, and the reason was a broken symlink in my Assets folder.
After removing the link the errors disappeared; just in case it might help someone else.