void DrawBatcher(Config.GroupConfig groupOptions) { if (groupOptions.BatcherType == null) { if (batcherTypes.Length > 0) { groupOptions.BatcherType = batcherTypes[0]; GUI.changed = true; //< for store value. } } if (groupOptions.BatcherType != null) { int batcherIndex = Array.IndexOf(batcherDisplayNames, groupOptions.BatcherType.Name); int newIndex = EditorGUILayout.Popup(Styles.Batcher, batcherIndex, batcherDisplayNames.ToArray()); if (batcherIndex != newIndex) { groupOptions.BatcherType = batcherTypes[newIndex]; //we don't need GUI.changed here. //Already set a value when popup index was changed. } if (groupOptions.Batcher != null) { var option = groupOptions.Batcher.GetBatcherOption(); if (option != null) { EditorGUI.indentLevel += 1; option.OnGUI(); EditorGUI.indentLevel -= 1; } } } EditorGUILayout.Space(); }
private void DrawTiangleRange(Config.GroupConfig groupOptions) { EditorGUILayout.PrefixLabel(Styles.LODTrangleRange); EditorGUI.indentLevel += 1; groupOptions.LODTriangleMin = EditorGUILayout.IntSlider(Styles.LODTrangleMin, groupOptions.LODTriangleMin, 10, 100); groupOptions.LODTriangleMax = EditorGUILayout.IntSlider(Styles.LODTrangleMax, groupOptions.LODTriangleMax, 10, 5000); EditorGUI.indentLevel -= 1; }
private void DrawSimplification(Config.GroupConfig groupOptions) { groupOptions.VolumeSimplification = EditorGUILayout.Toggle(Styles.VolumeSimplification, groupOptions.VolumeSimplification); if (groupOptions.VolumeSimplification) { EditorGUI.indentLevel += 1; groupOptions.VolumePolygonRatio = EditorGUILayout.Slider(Styles.PolygonRatio, groupOptions.VolumePolygonRatio, 0.0f, 1.0f); DrawTiangleRange(groupOptions); EditorGUI.indentLevel -= 1; } EditorGUILayout.Space(); }
private void DrawThreshold(Config.GroupConfig groupOptions) { groupOptions.LODThresholdSize = EditorGUILayout.FloatField("LOD Threshold size", groupOptions.LODThresholdSize); }