igrir

  • 24 янв 2021
  • Регистрация: 22 дек 2020

    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

    • Изменено

    Hello everyone!
    I'm using Spine for our game and would like to put the animation on the UI Canvas. Sadly I can't find suitable shader for the UI in URP.

    this is a SkeletonMecanim using "Spine/Skeleton" shader

    and then, this one is using shader from "Universal Render Pipeline/2D/Sprite-Lit-Default" and not placed on the canvas. This one looks good, but not suitable shader for UI

    This one is placed on the canvas and using the "Spine/SkeletonGraphic" shader. This one works, I can even mask the Skeleton using MaskGraphic component, but as you can see it looks like it has some glitch around the border

    I can use the shader from "Universal Render Pipeline/2D/Sprite-Lit-Default" but the masking component seems gave no effect to it

    Is there any specific settings I should use to make the character's skeleton can be placed on the UI and being masked?

    Thank you for the helps!


    Whooops! Never mind! I managed to get it working by set the Straight Alpha Texture to true on the material settings :grinteeth:

    • Изменено