#[Bug] URP cannot open a new project in most versions

1 messages · Page 1 of 1 (latest)

delicate edge
#

I mostly wonder if you ever encountered this bug, or found a potential workaround/fix to this.
Sorry if this is unrelated :)

This is a very old bug, even though I encountered first in Unity 2018.
When opening a new Unity project using URP, you get a compile error saying that ""Material" Does not contain a definition for "RawMaterialQueue"".
This error seemed to appear on every version except Unity 2021.1.0f1.
The solution to this (which worked sometimes) would be to install the Unity editor on the same hard drive that the Operating System sits at.
This bug was fixed again at an earlier beta of Unity 2022, but returned at full release and is now still appearing on Unity 2022 and Unity 2023.
In some versions, moving the installation works, and in most it doesn't.
It seems like Unity addressed this bug in many other forums, discussions and bug reports but it is still here.
Are you aware of this issue? And do you know if there are any plans fixing it in the future?
Thanks!

summer pawn
#

Hey @delicate edge , do you have any specific versions of Unity 2022 or 2023 that this error is appearing in? I'd like to try and reproduce locally. Thanks!

summer pawn
#

Are you using Windows as your OS? There may be an issue with long file paths causing issues when extracting a particular file (MaterialAssemblyReference.asmref) that causes this issue. That may explain why it seems to work when installing to a different hard drive (perhaps with a shorter install directory path?)

delicate edge
delicate edge
summer pawn
#

Yeah I agree that it is weird to only affect this one file. If you have a broken project you can always check to see if this file exists in the project:
C:*ProjectFolder*\Library\PackageCache\com.unity.shadergraph@*versionNumber&\Editor\Generation\Targets\BuiltIn\Editor\ShaderGUI\MaterialAssemblyReference\MaterialAssemblyReference.asmref

If it's missing it likely failed to extract.

There was 1 specific version of Unity that was accidently released with a version of this bug (2022.1.20f1 I think it was) but it shouldn't generally affect other versions.

#

I think there are options to enable longer file paths in Windows registry, but I'm no authority on that

delicate edge
#

Interesting!
I am downloading Unity to a first folder in a different drive and will update you if it works. 🙂

delicate edge
#

yea, the problem was solved by downloading the editor to a shorter path and creating a new project on a shorter path.
Thank you @summer pawn !

#

I would suggest maybe adding a feature to Unity Hub that lets you know if the path to projects folder is too long,
that would be really helpful to beginners. I remember this was the very first thing I encountered with urp and it drove me crazy.