Skip to content

It seems that a problem occurs when building after installing the USD package on URP. #420

@KimHyunBeom

Description

@KimHyunBeom

First of all, please understand that this was written through a translator.

I am using version 2022.3.10f, and I have noticed an issue where the following build error continues to occur when installing the USD package when creating a project with URP.

error CS0234: The type or namespace name 'BaseShaderGUI' does not exist in the namespace 'UnityEditor'(are you missing an assembly reference?)

It seemed that a problem related to UnityEditor continued to occur in UrpShaderImporter.cs, the script that caused the error, so I added the following code to the bottom and was able to solve the problem.

// Remove compile errors when URP package not installed
#if URP_AVAILABLE
#if UNITY_EDITOR   //What I added
            UnityEditor.BaseShaderGUI.SetupMaterialBlendMode(mat);
#endif
#endif

I don't know if this can be a fundamental solution. The version used was 3.0.0-exp.5, but the same problem continued to occur starting with 3.0.0-exp.4.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions