When I reimport a folder in our project containing scripts I get this for all the scripts in there.
Here’s an example: Importer(MonoImporter) generated inconsistent result for asset(guid:124ceec668bddc3458259a2cc6ebd3be) "Packages/com.kite.rendering/Runtime/RenderTargetHandle.cs"
Reimporting again doesn’t fix the issue.
Does this mean the import generates a different result each time?
Or does it mean when the reimport generates a different result it is not stored in the AssetDatabase?
(That would defeat the purpose of reimport, because if there’s one faulty import there would be no way to collect it.)
What is even generated from a C# script can be inconsistent?
I also wanted to ask about the same thing.
I started getting these “inconsistent result for asset” warnings in 2020.2, too. Occasionally for some random scripts, but consistently for the URP forward renderer asset (when I save a scene, etc.):
asset(guid:4a8e21d5c33334b11b34a596161b9360)
"Assets/Rpg/Core/Settings/ForwardRenderer.asset"```
I have essentially the same questions:
– Is it my fault or a bug?
– Is there a way to resolve it, when reimporting doesn't help?
This message means that the generated asset artifact is different from the previous import, even though the input and dependencies were the same. We’ve recently updated the 20.2 docs to include more information about the consistency checker.
There is examples of how to debug the result, so you could compare the import result, and there is more information in the editor.log about the found inconsistency.
However, this looks to be a bug in Unity and very much like something we’ve recently found and fixed in the serialised file header. We had an issue where a couple bytes in the header would be random garbage. You can “check” this by using the binary2text tool on the previous and new import result. If there is no difference between those two, then it’s likely the garbage byte.
Also, if you upload the library files and logs, I’ll happily take a look.
Hi,
thank you very much for the thorough explanation!
It does seem to be a bug – I ran -consistencyCheck on the project, and it pointed out “inconsistent results” even in Unity packages like Input System, Shader Graph etc., alongside with my own scripts, assets and folders.
I checked the Forward Renderer Data asset, specifically, because it pops up regularly – and the files seem to be identical; at least binary2text output is.
(This error also appeared during the consistency check a few times; I’m putting it here just for the sake of completeness.) Assertion failed on expression: 'ins.second || ins.first->second == artifactID || (ins.first->second == CircularDependencyArtifactID() && !artifactID.IsValid()) || GetPathFromAssetGuidV2(key.GetGUID()).ends_with(".cs")'
Yeah, seems like there’s something seriously broken right now. I’m on 2020.2b14 and get many of those warning which block me from testing my game.
@henriksc would you advice to go back to a previous version of the editor and see if the errors go away or would should be the best way to fix the issues?
How recently?
Is the fix in b13 or b14 or still unreleased?
I’m asking because I frequently switch back and forth between b13 and b14 because of various issues.
I’ll do the compare if needed, but if I’m on a version with a known bug than I won’t bother.
The fix hasn’t been backported to 20.2 yet. It’s currently only available in 21.1a9. I’ll update this thread once it does.
It would be interesting to hear if you observe a difference between certain Unity versions. But I don’t think it will help you in your case.
Also worth noting, the warnings from the consistency checker does not mean builds or editor is broken. It’s highlighting potential workflow issues down the line about editor determinism. An import will still work even if it’s flagged as being inconsistent. So if you experience that the warnings prevent you from testing your game, then I would very much like to hear some more details about how, so we can rectify the issues.
Alright, good to hear, as I was concerned about it. I’m experiencing a strange problem with one of my code files and the warning is mentioning a config file which relates to that code. So I was wondering if that is causing the problem or not. I’ll investigate a bit more what the problem is and submit a bug report if I find anything which is not on our side.
Yes, it’s supposed to be fixed in 21.1.0b4(still waiting for backport to 20.2, but it got bumped today).
Noticed from your gif that it was what seemed to be the forward rendering settings native asset. So I tried to reproduce it using a test project with URP, but haven’t had any success.
Would you be able to share a minimal project where this reproduces for you?
I sent one. Case 1310981. It’s related to the same Forward Renderer URP asset I mentioned earlier in the thread .
Although you should know I can’t replicate the bug anymore in a new test project nor when I do a full project reimport (i.e. deleting the Library folder or “Reimport All”) in the beta version. Still, it seems the consistency checker problem was carried over from 2020.2 and persists even after the updates or when I try to “Reimport” only the one problematic asset.
Therefore if someone (like me) encountered the issue in 20.2 and didn’t do a full project reimport after updating to 21.1, they might still get the warnings.
Is it possible that this issue may be affecting lightmaps as well? We’ve already spent days hunting down the causes of a lighting issue happening to most of our builds. This is how it looks on Editor and on builds coming from some PCs:
And this is how it looks on builds coming from our build server and eventually from a couple other PCs:
Sometimes we get messages like this one affecting lightmaps and lighting data assets:
Importer(NativeFormatImporter) generated inconsistent result for asset(guid:4408f65abb86b7e47844131dbf0dc42d) "Assets/PWS/Scenes/Game/Game_ResidentialSmall_Backyard/LightingData.asset"
This has been reproduced on Unity 2020.2.2f1, 2020.2.5f1 and 2020.2.7f1. We tried purging the Accelerator cache and also disabling it altogether, deleting the Library folder, without success. We were unable to isolate the issue, which is why we haven’t reported a bug yet. I tried opening editor with -consistencyCheck and got 999+ “inconsistent results” warnings, so I suspect the issue isn’t in our code but an Unity bug.
We’re now preparing a build using 2021.1.0b10.2062, will reply to this post with its results once they’re available.
I’m seeing this too now after upgrading my project from 2020 to 20201.1.1f1. For me the error is occuring on the Global Volume Profile post processing asset, which is causing my post process not to work.
@LeonhardP Unfortunately, this seems to pop up again after I updated to 2021.2.0a19 (previously, a16 and a17 were fine).
Same problem, same reproduction steps. Saving a scene or manually reimporting shows the warning.
When manually reimporting the Universal Renderer Data asset:
Importer(NativeFormatImporter) generated inconsistent result for asset(guid:8aa25a71635ef2140bcab240d45a5687) "Assets/Rpg/Core/Settings/URP/URP.asset"
UnityEditor.RetainedMode:UpdateSchedulers ()
Reimporting a scene:
Importer(DefaultImporter) generated inconsistent result for asset(guid:500251ccce6614d4baabf5558d24e1c5) "Assets/Rpg/Levels/_Test/Playground/Playground.unity"
Edit:
I ran a -consistencyCheck on the project and it found problems in almost everything, e.g.:
I was still getting this in 2020.3.11f1 until I did a Reimport All on the project. Now I can reimport individual files/folders without triggering this warning.