URP/Shader Graph Issues

So, I’m not sure if this has been an issue for others but for some reason I cannot, no matter what I’ve tried so far, use URP because shader graph keeps throwing an error. I have been trying to find a fix for this for a while now… Please help.

Library\PackageCache\com.unity.shadergraph@14.0.4\Editor\Generation\Targets\BuiltIn\Editor\ShaderGUI\BaseShaderGUI.cs(212,34): error CS0103: The name ‘MaterialAccess’ does not exist in the current context

Did you start your project with the 3D URP template? It looks like the error is dealing with the BuiltIn render.

Not with this current project. But, since getting the error I attempted to make another project with both the 3D URP template and the 3D URP Template with the example scene and both give the same error. I have also uninstalled and re-installed Unity to see if maybe something was corrupted during download but I go the same results.

Are you using 2022.1.21 by chance? I found a thread on Reddit mentioning instabilities with URP on this particular version (well, the thread has claims of all versions, but 2022.1.21 has a lot of mentions… I’m not getting these errors on 2022.2.0

I started with 2019.4.35f1 and when I had the issue there I upgraded to 2021.3.16f1. When I still had the issue I upgraded again to 2022.2.1f1 because I saw something on Unity’s forums saying that they fixed stability issues. I know that’s not super helpful but from what I can see it almost looks like either a script is getting missed when downloaded, or just isn’t present.

You might take this to the Unity support forums, especially if it’s happening across versions for you…
https://forum.unity.com/forums/universal-render-pipeline.383/

I did happen to find somebody having the same issue but it seems there hasn’t been any solution to it yet. I’m not honestly sure what happen because I have used URP before and had no issues.

https://forum.unity.com/threads/error-installing-shader-graph.1377288/

What happens if you create a NEW project with 2022.2.f1, as opposed to upgrading the existing project? If a new project doesn’t throw the error, then you should be able to copy the entire contents of the Assets folder over to the new project.

I uninstalled and re-installed 2019.4.35f1 and can use Shader Graph in that version again. But still no luck for 2021 or 2022. It looks like the entire MaterailAccess script is missing. I looked in the directory for 2019 but it looks like there were a bit of changes that make it hard to see the difference from this version of shader graph vs 2022. I’m not sure if this will really effect much in the project but I’m just glad I can finally use URP.

I have posted a correct version of shadergraph version 12.18 on 2021.3.16f1. I had the error I think you were the person you were reffering to

https://forum.unity.com/threads/running-into-a-strange-error-with-shader-graph-12-1-6-and-urp-12-1-6-in-unity-2021-2-16f1.1256823/

Scroll right down on the thread to find the .zip

Privacy & Terms