如何解决统一出现“ 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 举报,一经查实,本站将立刻删除。