unity报Could not create a custom UI for the shader 'TerrainSurface'错误解决方法

分类栏目:unity3d教程

75

unity 报 下面这个错误,如何解决?

Could not create a custom UI for the shader 'TerrainSurface'. The shader has the following: 'CustomEditor = BlendShaderGUI'. Does the custom editor specified include its namespace? And does the class either derive from ShaderGUI or MaterialEditor? UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

回答:

这个是用了ShaderForge生成的shader吧,ShaderForge 有个shader设置面板,点材质会自动出这个面板(应该是吧这个意思吧,没用过ShaderForge 。。),你现在个工程里没ShaderForge 插件,所以会报错。找到那个shader把最后那句'CustomEditor = ASEMaterialInspector'注释掉就不报错了。

打开shader,没装VS的话就用记事本打开 在最后那句的前面加两个//