Пример #1
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        polyGrid = (PolyGrid)target;

        tab = GUILayout.Toolbar(tab, typeNames);

        if (polyGrid.NumFaces() == 0)
        {
            if (GUILayout.Button("Create Grid"))
            {
                GridFactory.PopulateSquareGrid(ref polyGrid);
            }
        }

        showGridProperties = EditorGUILayout.Foldout(showGridProperties, "Grid Properties");
        if (showGridProperties)
        {
            ShowGridProps();
        }


        showAdvancedOptions = EditorGUILayout.Foldout(showAdvancedOptions, "Advanced");
        if (showAdvancedOptions)
        {
            ShowAdvancedOptions();
        }
    }