Search Unity

LWRP - cannot override inherited member 'BaseShaderGUI.ShaderPropertiesGUI(Material)

Discussion in 'General Graphics' started by TeohRIK, Apr 18, 2019.

  1. TeohRIK

    TeohRIK

    Joined:
    Jan 22, 2014
    Posts:
    106
    Hi,

    I faced some problem after upgraded to 2019 with latest version of LWRP, then I faced this particular error when trying to override ShaderPropertiesGUI function


    error CS0506: 'TCP2_MaterialInspector_LWRP_SG.ShaderPropertiesGUI(Material)': cannot override inherited member 'BaseShaderGUI.ShaderPropertiesGUI(Material)' because it is not marked virtual, abstract, or override


    Base on the documentation(https://docs.unity3d.com/Packages/c...weight@4.0/api/UnityEditor.BaseShaderGUI.html), the ShaderPropertiesGUI is a virtual function which is overrideable, but seem like there some problem with latest LWRP version

    Thanks.
     
    Malkyne likes this.
  2. bourriquet

    bourriquet

    Joined:
    Jul 17, 2012
    Posts:
    181
    Up.
    The metadata for BaseShaderGUI give this:

    public abstract class BaseShaderGUI : ShaderGUI
    {
    ....
    public void ShaderPropertiesGUI(Material material);
    ....

    How can a non-defined method not be marked abstract? That seems like wrong C# to me..