Search Unity

Resolved Running into a strange error with Shader Graph 12.1.6 and URP 12.1.6 in Unity 2021.2.16f1

Discussion in 'Editor & General Support' started by Zklegon, Mar 23, 2022.

  1. Zklegon

    Zklegon

    Joined:
    Aug 24, 2018
    Posts:
    13
    So I've been trying to download my projects to my new laptop and anytime I make a new 3D URP based project I run into the error below. It seems to be related to Shadergraph and URP specifically, if I remove these packages from the project everything works fine. If it makes any difference, Both versions of Unity I have tried this with are located in a custom applications folder instead of their default install location. I wouldn't expect this to be the reason for the error since everything else with the project seems to work fine.


    The Error:
    Library\PackageCache\com.unity.shadergraph@12.1.6\Editor\Generation\Targets\BuiltIn\Editor\ShaderGUI\MaterialAssemblyReference\RawRenderQueue.cs(12,24): error CS1061: 'Material' does not contain a definition for 'rawRenderQueue' and no accessible extension method 'rawRenderQueue' accepting a first argument of type 'Material' could be found (are you missing a using directive or an assembly reference?)

    This is the Script being referenced:
    using System.Runtime.CompilerServices;
    using UnityEngine;

    [assembly: InternalsVisibleTo("Unity.ShaderGraph.Editor")]

    namespace UnityEditor.Rendering.BuiltIn.ShaderGraph
    {
    internal static class MaterialAccess
    {
    internal static int ReadMaterialRawRenderQueue(Material mat)
    {
    return mat.rawRenderQueue;
    }
    }
    }

    I also get this error on opening the project:
    Asset Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/Editor/ShaderGUI/MaterialAssemblyReference/MaterialAssemblyReference.asmref has no meta file, but it's in an immutable folder. The asset will be ignored.


    Do I need to delete or change something to make this work? Does anyone know why this is happening?

    Edit: Some additional info, on my other computer I'm using 12.1.4 and I've never seen these issues, is there way I can just use that version? Also this computer is currently running Windows 11 if that makes a difference
     
    Last edited: Mar 23, 2022
    Eclextic likes this.
  2. Zklegon

    Zklegon

    Joined:
    Aug 24, 2018
    Posts:
    13
    Just adding a message to bump this up since it was getting a bit buried

    Edit: Was able to solve this problem, will write a post detailing how tomorrow
     
    Last edited: Mar 26, 2022
  3. Zklegon

    Zklegon

    Joined:
    Aug 24, 2018
    Posts:
    13
    The way I fixed this was by uninstalling and reinstalling Unity Hub and my existing Unity Engine installs. I then installed the latest version of Unity (2021.2.17f1) and grabbed my project from Plastic and the issue seems to be fixed. Not entirely sure if it was because of how the folder structure was setup (previously there were two separate Unity folders present) or if grabbing 2021.2.17 fixed it but things seem to be working now! Going to mark the thread as resolved.
     
  4. SahasRai

    SahasRai

    Joined:
    May 4, 2022
    Posts:
    1
    The unity is not responding
     
  5. LibooSoft

    LibooSoft

    Joined:
    Jun 19, 2019
    Posts:
    20
    Same thing happens to me. Unity 2021.3.2f1
     
  6. unity_ctg0ujCJYRi52g

    unity_ctg0ujCJYRi52g

    Joined:
    Jun 1, 2020
    Posts:
    11
  7. hosseinpanahloo

    hosseinpanahloo

    Joined:
    Jun 28, 2018
    Posts:
    11
    Same problem when creating a new project URP 3D template with unity 2021.3.1f1. And also the same problem when adding the URP package to an existing project.
     
    tyawesome111 likes this.
  8. A_passionate_game_dev

    A_passionate_game_dev

    Joined:
    Jun 17, 2022
    Posts:
    3
    I am having the same issue. I am using unity 2021.3.4f1
    Reimporting the project doesn't solve my issue :(.
     
  9. SweatyTryhard

    SweatyTryhard

    Joined:
    May 3, 2017
    Posts:
    3
    I am having the same issue. When loading a new project based on the URP 3D template there are 100+ errors relating to missing meta files in immutable folders.
     
  10. Breaks-

    Breaks-

    Joined:
    Sep 20, 2022
    Posts:
    1
    Same issue. i find that a file is missing.
    unzip this and drag it into “\MyProject\Library\PackageCache\com.unity.shadergraph@12.1.7\Editor\Generation\Targets\BuiltIn\Editor\ShaderGUI\MaterialAssemblyReference” then back to unity to recompile the scripts.
    if this still doesn't work, just do it again.
     

    Attached Files:

  11. cooperjbower

    cooperjbower

    Joined:
    Aug 21, 2021
    Posts:
    2
    i love you, no homo
     
  12. Valek_Ravenwood

    Valek_Ravenwood

    Joined:
    May 1, 2022
    Posts:
    1
    Still getting this error expect im using 12.1.7 versions of HDRP/URP and shader graph. Currently it is impossible to use any shadergraph and or HDRP/URP. even loading the basic HDRP/URP template gives a do you want to run in safe mode due to errors, message.
    Using unity 2021.3.12f1

    I have reinstalled unity multiple times, reset package manger, reimported assets. No luck at all.
     
  13. Anonymou5Coding

    Anonymou5Coding

    Joined:
    Jan 15, 2021
    Posts:
    28
    Hey, I am missing the CS script that matches that meta file can u please send it please, you should be a like saver
     
  14. Anonymou5Coding

    Anonymou5Coding

    Joined:
    Jan 15, 2021
    Posts:
    28
    For anyone who is having issues here is a dlownload to a working shader graph 12.1.8 install from 2021.3.16f1 just replace the existing one from Library/PackageCache
     
  15. Onepete7

    Onepete7

    Joined:
    May 14, 2023
    Posts:
    4
    Hey guys,

    Since it looks like no definitive answer has been delivered here, here is my solution.

    I'm convinced the issue has to do with residues of Unity from previous installations. I had Unity installed a while ago on another hard drive and since I removed it from my computer, I could not delete the file from the Apps and Features menu.

    Here is my solution for Windows 10 Pro :

    1 - Enable seeing hidden files on your computer
    2 - Save your projects on another drive/cloud then delete them from your computer
    3 - Completely uninstall Unity and Unity Hub
    4 - Go to C:\Users\YourName\AppData\Local and delete the folders from Unity and Unity Hub (don't worry, if you delete those, they will be recreated at the reinstallation, you just need a clean install)
    5 - If you have the same specific issue as me, follow this tutorial
    BE CAREFUL WHILE DELETING FILES FROM REGISTRY AND ALWAYS CREATE A BACKUP REGISTRY
    6 - Completely turn off your computer to save the changes (careful, because some computer just turn into heavy sleep mode, you need to pull the plug to be sure it works)
    7 - Reinstall Unity Hub and the latest LTS Unity version, it should work properly

    Spent an afternoon of my day off to fix this issue, don't hesitate to update this post if the solution does not work, since we seem to have no help from Unity for this.

    Peace,

    OnePete7
     
  16. anzilparviz

    anzilparviz

    Joined:
    Jul 18, 2022
    Posts:
    1

    Hey Man the correct code is
    using System.Runtime.CompilerServices;
    using UnityEngine;

    [assembly: InternalsVisibleTo("Unity.ShaderGraph.Editor")]

    namespace UnityEditor.Rendering.BuiltIn.ShaderGraph
    {
    internal static class MaterialAccess
    {
    internal static int ReadMaterialRawRenderQueue(Material mat)
    {
    return mat.renderQueue;
    }
    }
    }
     
  17. FrostCop

    FrostCop

    Joined:
    Feb 2, 2018
    Posts:
    1
    You are a hero <3
     
  18. Neith

    Neith

    Joined:
    Feb 11, 2015
    Posts:
    6
    Thank you Breaks-!