• Unity
  • Error when using Universal Render Pipeline material

  • Изменено
Related Discussions
...

Greetings!

I was using Spine with URP. After I selecting materials I used, then this log continuously popped up

Here's the error logged in console

NullReferenceException: Object reference not set to an instance of an object
SpineSpriteShaderGUI.RenderDiffuseRampProperties () (at Assets/Spine/Editor/spine-unity/Editor/Shaders/SpineSpriteShaderGUI.cs:653)
SpineSpriteShaderGUI.RenderTextureProperties () (at Assets/Spine/Editor/spine-unity/Editor/Shaders/SpineSpriteShaderGUI.cs:461)
SpineSpriteShaderGUI.ShaderPropertiesGUI () (at Assets/Spine/Editor/spine-unity/Editor/Shaders/SpineSpriteShaderGUI.cs:284)
SpineSpriteShaderGUI.OnGUI (UnityEditor.MaterialEditor materialEditor, UnityEditor.MaterialProperty[] properties) (at Assets/Spine/Editor/spine-unity/Editor/Shaders/SpineSpriteShaderGUI.cs:202)
UnityEditor.MaterialEditor.PropertiesGUI () (at <a8e33794c0064f2aa201ade069162226>:0)
UnityEditor.MaterialEditor.OnInspectorGUI () (at <a8e33794c0064f2aa201ade069162226>:0)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <a8e33794c0064f2aa201ade069162226>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Is there anything I can do to fix this error? Thanks!


I commented out lines that using _diffuseRamp in SpineSpriteShaderGUI and looks like it runs fine

igrir написал

Is there anything I can do to fix this error? Thanks!

Please update spine-unity, this bug has been fixed in the past already, all 3.8 unitypackages newer than 2020-12-22 include the bugfix.

In general when having problems, please first check if the latest package already resolves your problem, to save time and effort.