统一出现“ GUI错误:您推动的GUIClip多于弹出”

问题描述

我在Unity中创建了一个表格,并在其上方添加了2个滑块。我已经无数次制作了这样的表格,但从未将变量放在表格上方。我注释掉了两条IntSlider行,然后做完之后,一切工作正常。但是,一旦我将它们放回原处,无论它们在哪里,都会出现此错误。这是引起我麻烦的一小段代码(整个文件为317行,因此我将其发布在Github上)

showVeg = EditorGUILayout.Foldout(showVeg,"vegetation");  
if (showVeg) {
    EditorGUILayout.LabelField("",GUI.skin.horizontalSlider);
    GUILayout.Label("vegetation",EditorStyles.boldLabel);
    EditorGUILayout.IntSlider(maxTrees,10000,new GUIContent("Maximum Trees"));
    EditorGUILayout.IntSlider(treeSpacing,2,20,new GUIContent("Tree Spacing"));
    vegMapTable = GUITableLayout.DrawTable(vegMapTable,serializedobject.FindProperty("vegetation"));
    GUILayout.Space(20);
    EditorGUILayout.BeginHorizontal();
    if (GUILayout.Button("+")) {
        terrain.Addvegetation();
    }
    if (GUILayout.Button("-")) {
        terrain.Removevegetation();
    }
    EditorGUILayout.EndHorizontal();
    if (GUILayout.Button("Apply vegetation")) {
        terrain.Plantvegetation();
    }
} 

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)