Missing Assembly Ref in UnityEngine.Experimental.Rendering.Universal

using Windows 10
using Unity 6000.0.2f

Hey folks, not sure if this is a bug, but it is a problem in my buildpipeline I use based on ScriptableObjects and TeamCity. Today I got this problem with one of my Unity projects building throw TeamCity with buildmachine. When I build it locally on my devstation everything builds without a problem, but when triggered remotely, the first buildstep, which is just the checkout and the unity build this issue pops up:

[Script Updater] Failed to resolve 'None' expression : Library/PackageCache/com.unity.2d.pixel-perfect/Editor/Converter/U2DToURPPixelPerfectConverter.cs (57,76). 
This may cause expected updates to not be applied. 
[18:28:19] : [Step 1/2] [ApiUpdater] Total time: 4951ms, Parse response file: 205ms, Collect updater configs: 2323ms, Update: 2413ms, Save: 10ms Files: 2 modified / 2 visited / 5 total (Library/Bee/artifacts/1900b0aEDbg.dag/Unity.2D.PixelPerfect.Editor.dll). 
[18:28:19] : [Step 1/2] STDERR: 
[18:28:21]E: [Step 1/2] [Script Updater] Library/PackageCache/com.unity.2d.pixel-perfect/Editor/Converter/U2DToURPPixelPerfectConverter.cs(26,65): error CS0234: Der Typ- oder Namespacename "PixelPerfectCamera" ist im Namespace "UnityEngine.Experimental.Rendering.Universal" nicht vorhanden. (Möglicherweise fehlt ein Assemblyverweis.) 
[18:28:21]E: [Step 1/2] [Script Updater] Library/PackageCache/com.unity.2d.pixel-perfect/Editor/Converter/U2DToURPPixelPerfectConverter.cs(36,39): error CS0234: Der Typ- oder Namespacename "PixelPerfectCamera" ist im Namespace "UnityEngine.Experimental.Rendering.Universal" nicht vorhanden. (Möglicherweise fehlt ein Assemblyverweis.) 
[18:28:21]E: [Step 1/2] [Script Updater] Library/PackageCache/com.unity.2d.pixel-perfect/Editor/Converter/U2DToURPPixelPerfectConverter.cs(38,39): error CS0234: Der Typ- oder Namespacename "PixelPerfectCamera" ist im Namespace "UnityEngine.Experimental.Rendering.Universal" nicht vorhanden. (Möglicherweise fehlt ein Assemblyverweis.)

This text: Der Typ- oder Namespacename “PixelPerfectCamera” ist im Namespace “UnityEngine.Experimental.Rendering.Universal” nicht vorhanden. (Möglicherweise fehlt ein Assemblyverweis.)
is german and just means: a type or namespace PixelPerfectCamera is not available in “UnityEngine.Experimental.Rendering.Universal” (maybe an assemblyreference is missing)

Now the funny thing is: the build itself is actually successful. I can access the build and start the .exe without issues, but the following buildsteps are skipped since this buildstep is rendered as failed bc of this issue in TeamCity apparently.
I did some investigation and for the love of all deities I cant fix that issue above, but it seems that I dont even need to fix it, bc the build in unity itself gets executed.
What I also did is opening the cloned project on the buildmachine manually and doing a manual build there. The build of the game itself gets created, it’s just this one error log apparently renders the TeamCity buildstep as failed for some reason. Apparently Unity throws the error but somehow fixes it along the further import process I guess. I even opened the project on the buildmachine and checked the asmdef files of the PixelPerfect package and it seems fine. I deleted the Library folder and re-opened it manually. There seems no issue.

But why is this [Script Updater]-error thrown in the first place? It seems when cloning and importing the error is thrown but then kinda solved on its own? Or is it really? Cant tell what is happening there but it renders my CI setup as failed, even when I try to configure the fail conditions to ignore all errors it still counts it as failed which is annoying.

Does your buildpipeline include some form of build caching? If so, I would clean that. It’s possible that by upgrading the editor the build pipeline still thinks it’s working with an older editor version and this very run is the editor update, so it will run the script updater unless the cache is properly updated or cleaned.

And make sure the buildpipeline build actually uses the exact same editor version as indicated by ProjectSettings/ProjectVersion.txt or whether, for whatever reason, this ProjectVersion.txt isn’t up to date in source control.

Hey @CodeSmile

The buildmachine is using the exact same editor version as the project, yes.
And no, there is no buildcache at the moment. The checkout is for now a completely clean one.
So it clones the project with also a non-existing library folder, imports the project, the error gets thrown but is apparently not a problem, after compilation it starts the actual unity build process and finishes the build which I can access and play without problems.

Is there a way to stop the ScriptUpdater or specify what to update or not?

Are you using the com.unity.2d.pixel-perfect package in your project? If not, you could just remove it.

Strange that the updater even runs on a registry package.
Not aware of any way to control the updater.

Yes, that was my next step to do, I’m not using it so I’ll remove it. I thought I’d mention it here at least, it might not be a bug per se or but maybe someone from Unity can give some more insights why this might be happening

@CodeSmile
Huh, apparently I cant really remove the package?
When clicking on the remove button it apparently removes it but then it locks it and the remove button is greyed out saying that the package cant be removed because another installed package depends on it. But the manifest file does not list the package anymore, the packages-lock file does list an pixel perfect entry, the depth value is just set to 1.
I pushed this change and made a build and it still failed with the same errors, so I guess it wasnt really removed, which is weird since I dont even use this package at all and afaik it’s basically one script that you attach to cameras.

Hello, I also have a similar problem.
After checking the file, I found that the official changed the location of the namespace.
My solution was to open “U2DToURPPixelPerfectConverter.cs”
turn up
using URPPackage = UnityEngine.Experimental.Rendering.Universal;
Change to
using URPPackage = UnityEngine.Rendering.Universal;

3 Likes

When upgrading an old Unity project to a newer Unity 6 version, follow these steps:

  1. Create a new Unity project.

  2. Delete the Library folder from your old Unity project.

  3. Copy the Library folder from the new Unity project and paste it into the old project.

This method resolves compatibility issues during the upgrade process.

I think you can also regenerate the library folder after deleting it

Does this really help, or is this just a convoluted way of doing „delete Library“?

I would recommend to apply the default „delete Library“ approach first and foremost 
 copying some other project‘s Library can have unexpected side-effects such as the Library using GUIDs that are not actually in the current project.

2 Likes