Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug ShaderGraph error when trying to set custom mesh

Discussion in '2020.1 Beta' started by poppydeejay, Mar 27, 2020.

  1. poppydeejay

    poppydeejay

    Joined:
    Oct 29, 2013
    Posts:
    1
    Unity version: 2020.1.0b3.3385

    Repro steps:
    - Create a new project using Unity 2020.1.0b3.3385
    - Select the universal render pipeline
    - Create a new Shader -> PBR Graph
    - Right click on preview -> Custom Mesh
    - Notice the error.

    upload_2020-3-27_13-54-45.png

    NullReferenceException: Object reference not set to an instance of an object
    UnityEditor.ShaderGraph.Drawing.Inspector.MasterPreviewView.ChangeMeshCustom () (at Library/PackageCache/com.unity.shadergraph@8.0.1/Editor/Drawing/Inspector/MasterPreviewView.cs:198)
    UnityEditor.ShaderGraph.Drawing.Inspector.MasterPreviewView.<BuildContextualMenu>b__31_0 (UnityEngine.UIElements.DropdownMenuAction e) (at Library/PackageCache/com.unity.shadergraph@8.0.1/Editor/Drawing/Inspector/MasterPreviewView.cs:140)
    UnityEngine.UIElements.DropdownMenuAction.Execute () (at <53e0fbd5e130421e81a0b5c1afcf22ee>:0)
    UnityEditor.UIElements.EditorMenuExtensions+<>c__DisplayClass0_0.<PrepareMenu>b__0 () (at <e2353c5c084f4b5a9d8ead9c6b8ffaa2>:0)
    UnityEditor.GenericMenu.CatchMenu (System.Object userData, System.String[] options, System.Int32 selected) (at <e2353c5c084f4b5a9d8ead9c6b8ffaa2>:0)
     
    lajala, Lecks, Enrico-Monese and 2 others like this.
  2. lajala

    lajala

    Joined:
    Sep 28, 2013
    Posts:
    1
    I am experiencing the same
     
  3. mnenad

    mnenad

    Joined:
    Dec 7, 2015
    Posts:
    18
    Same issue.
     
  4. Marioooo

    Marioooo

    Joined:
    Sep 20, 2017
    Posts:
    6
    upload_2020-5-25_20-50-13.png
    same error here!
     
  5. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,126
    This issue should be fixed in 7.4 and 8.1.
     
  6. wichilowat

    wichilowat

    Joined:
    Feb 9, 2015
    Posts:
    10
    This just happened to me as well in 2022.2.10 :(
     
    Wright and clbrunet like this.
  7. trurkowski

    trurkowski

    Joined:
    Sep 3, 2019
    Posts:
    6
    This has also happened to me -
    I believe it occurs when you have assigned a mesh to the custom mesh preview, and then remove the mesh from the project - hence the NULL
    - I recently did a project cleanup where I get rid of junk I no longer need, and this started happening roughly around then.

    I'm looking for a way to reset it but coming up blank!
     
    wichilowat likes this.
  8. wichilowat

    wichilowat

    Joined:
    Feb 9, 2015
    Posts:
    10
    SMART!

    I recently also removed a lot of unnecessary junk so this makes sense.