Exemplo n.º 1
0
        public override void OnInspectorGUI()
        {
            GUILayout.BeginVertical(EditorStyles.helpBox);
            settings.DebugDraw = EditorGUILayout.Toggle("Debug Draw", settings.DebugDraw);
            settings.Segments  = EditorGUILayout.IntSlider("Segments", settings.Segments, 3, 25);
            ScalpProviderInspactor();
            HairMeshFiltersList();

            if (GUILayout.Button("Generate"))
            {
                settings.Process();
                sugestedSegments = "Suggested segments values is:";
                for (int i = 3; i < 2000; i++)
                {
                    var count = settings.HairGroupsProvider.Vertices.Count;
                    if ((count % i == 0) && (count / i < 26) && (count / i < 26))
                    {
                        sugestedSegments += count / i + " ";
                    }
                }
            }

            GUILayout.Label(sugestedSegments);

            GUILayout.EndVertical();
        }