0

I had reached for here while struggling with some problems about applying a Package to Unity.

Problem

I’m trying to apply “Shader Graph [v. 12.1.10]” package into Unity [v. 2021.3.20.f1] but there is a problem like below

enter image description here

Library\PackageCache\com.unity.shadergraph@12.1.10\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?)

RawRendererQueue.cs in 'Shader Graph' package
[ ^ RawRendererQue.cs in 'Shader Graph' package ]

enter image description here
[ ^ Material.cs that has a method named rawRendererQueue() in UnityEngine ]

It seems that package can’t access “Material” class in Unity Engine,
judging by neither “Go to Definition” nor “Code Highlighting” on “Material” Class that delivered to ReadMaterialRawRendererQue(Material mat) does not working.
But I don't know How can I solve this problem.

What I’ve tried?

  • reinstall Shader Graph Package (but same)
  • install another version Unity [v. 2021.3.22f1] and apply Shader Graph Package (but same)

Ps. What I really want to do with Shader Graph

As a side note, I am going to make a shader for 2D plane that visualize 1 * 1 cell grid like below video course,
[ Showing grid on a map in Unity - Grid Placement System P2 by Sunny Valley Studio ]
but I got off on the wrong foot with applying a package.

J4BEZ
  • 374
  • 4
  • 17
  • 2
    Have you tried deleting "Library" directory and restarting the project? If create an empty project and import Shader Graph package in it, does the issue repeat? – stazik Apr 14 '23 at 06:34
  • @stazik Sorry for late to check comment and I aprreciate for your attention on my Question I would also try create an empty project [for 21.3.20f1, 21.3.22f1, 22.2.14f1] but it return same sympton. Deleting the Library folder was a new way of doing it, but it still causes the same symptom. – J4BEZ Apr 15 '23 at 13:17
  • @stazik I apreciate you give me attention for this question – J4BEZ Apr 15 '23 at 13:19
  • 2
    could you further share the project on github or another source? I tried to repeat the issue, but for me, shader graph works correctly. rawRendererQueue is detected – stazik Apr 15 '23 at 15:48
  • 1
    You might have another rouge `Material` class mucking about in your project. It can either be in your own scripts or some random package. – Voidsay Apr 17 '23 at 08:37
  • 1
    Do you have a "Unity UI" folder in the packages folder? – shingo Apr 18 '23 at 08:54
  • @stazik Sorry for late Here is link that store the Unity project[v. 2022.2.14f] which I attached Shader Graph[v 14.0.7] [ https://drive.google.com/file/d/1E5ySHSXf9B07bagf46ryomffX9RdDTXA/view?usp=sharing ] – J4BEZ Apr 18 '23 at 12:25
  • @Voidsay I hope so.. But It appears same in the new Project – J4BEZ Apr 18 '23 at 12:27
  • @shingo hmm.. In "Packages" folder there just exist manifest.json and packages-lock.json, but, In Library > PackageCache folder, It has com.unity.ugui@1.0.0 folder – J4BEZ Apr 18 '23 at 12:31
  • Thank you very much for your deep interest. First of all, the goal what I want(grid pattern material) solved it by creating one more Tilemap But, I don't know why I can't apply the package – J4BEZ Apr 18 '23 at 12:33

0 Answers0