void OnGUI()
    {
        if (_easyColliderEditor == null)
        {
            if (SelectedGameObject != null)
            {
                OnDisable();
                SelectedGameObject = null;
            }
            OnEnable();
        }

        EditorGUI.BeginChangeCheck();
        SelectedGameObject = (GameObject)EditorGUILayout.ObjectField("编辑对象:", SelectedGameObject, typeof(GameObject), true);
        EditorGUI.EndChangeCheck();
        if (GUI.changed)
        {
            if (SelectedGameObject != null)
            {
                if (!EditorUtility.IsPersistent(SelectedGameObject))
                {
                    GameObjectSelectedHasChanged();
                }
                else
                {
                    SelectedGameObject = null;
                }
            }
            else
            {
                GameObjectSelectedHasChanged(); //取消了编辑对象
            }
        }
        if (GameObjectIsActiveAndFromScene(ref SelectedGameObject))
        {
            if (MeshTransformList == null)
            {
                GameObjectSelectedHasChanged();
            }
            EditorGUI.BeginChangeCheck();
            VertexSelectEnabled = EditorGUILayout.ToggleLeft(new GUIContent("开启顶点选择", "开启射线选择顶点视图"), VertexSelectEnabled);
            EditorGUI.EndChangeCheck();
            _easyColliderEditor.SelectVertByRaycast = VertexSelectEnabled;
            if (VertexSelectEnabled && GUI.changed)
            {
                _easyColliderEditor.SelectedVertices.Clear();
                if (EditorWindow.focusedWindow != SceneView.currentDrawingSceneView)
                {
                    if (SceneView.currentDrawingSceneView != null)
                    {
                        SceneView.currentDrawingSceneView.Focus();
                    }
                }
            }

            EditorGUI.BeginChangeCheck();
            ColliderSelectEnabled = EditorGUILayout.ToggleLeft(new GUIContent("开启Collider选择", "开启Collider选择视图"), ColliderSelectEnabled);
            EditorGUI.EndChangeCheck();
            _easyColliderEditor.SelectColliderByRaycast = ColliderSelectEnabled;
            if (ColliderSelectEnabled && GUI.changed)
            {
                _easyColliderEditor.SelectedCollider = null;
                if (EditorWindow.focusedWindow != SceneView.currentDrawingSceneView)
                {
                    if (SceneView.currentDrawingSceneView != null)
                    {
                        SceneView.currentDrawingSceneView.Focus();
                    }
                }
            }
            if (_easyColliderEditor.SelectedCollider != null)
            {
                if (GUILayout.Button(new GUIContent("移除碰Collider", "移除当前所选中的Collider")))
                {
                    Undo.DestroyObjectImmediate(_easyColliderEditor.SelectedCollider);
                    _easyColliderEditor.SelectedCollider = null;
                }
            }

            //Which object to attach created colliders to. Changed to enum popup to improve UI/confusion by having multiple checkboxes where one has to be checked, enum works better for this.
            attachmentStyle = (AttachmentEnum)EditorGUILayout.EnumPopup(new GUIContent("增加到:",
                                                                                       "用于增加Collider的方法,可以增加到选定的游戏对象(如果可能),也可以增加到创建的子Collider父对象上"), attachmentStyle);
            if (attachmentStyle == AttachmentEnum.ColliderHolders)
            {
                AttachToBaseObject           = false;
                AttachToColliderHolders      = true;
                TransformToAttachCollidersTo = null;
            }
            else if (attachmentStyle == AttachmentEnum.SelectedGameObject)
            {
                AttachToBaseObject           = true;
                AttachToColliderHolders      = false;
                TransformToAttachCollidersTo = SelectedGameObject.transform;
            }

            //collider creation buttons on editor window show up only after vertices are selected.
            if (_easyColliderEditor.SelectedVertices.Count > 0)
            {
                if (GUILayout.Button(new GUIContent("Create Box Collider",
                                                    "Creates a Box Collider that contains the currently selected vertices. See documentation for vertex selection guide.")))
                {
                    if (_easyColliderEditor.SelectedVertices.Count <= 1)
                    {
                        Debug.LogWarning("To create a box collider correctly at least vertices should be selected. See documentation for for more info.");
                    }
                    CreateOrSetObjectToAttachColliderTo();
                    _easyColliderEditor.CreateBoxCollider(TransformToAttachCollidersTo);
                }
                if (GUILayout.Button(new GUIContent("Create Sphere Collider",
                                                    "Creates a Sphere Collider that contains the currently selected vertices. See documentation for vertex selection guide.")))
                {
                    if (_easyColliderEditor.SelectedVertices.Count <= 1)
                    {
                        Debug.LogWarning("To create a sphere collider at least 2 vertices should be selected. See documentation for more info.");
                    }
                    CreateOrSetObjectToAttachColliderTo();
                    _easyColliderEditor.CreateSphereCollider(TransformToAttachCollidersTo);
                }
                if (GUILayout.Button(new GUIContent("Create Capsule Collider",
                                                    "Creates a Capsule Collider that contains the currently selected vertices. See documentation for vertex selection guide.")))
                {
                    if (!(_easyColliderEditor.SelectedVertices.Count == 3))
                    {
                        Debug.LogWarning("To create a capsule collider correctly 3 vertices should be selected. See documentation for more info.");
                    }
                    CreateOrSetObjectToAttachColliderTo();
                    _easyColliderEditor.CreateCapsuleCollider(TransformToAttachCollidersTo);
                }
                if (GUILayout.Button(new GUIContent("Create Capsule Collider Alternate",
                                                    "Creates a Capsule Collider that contains the currently selected vertices. See documentation for vertex selection guide.")))
                {
                    if (!(_easyColliderEditor.SelectedVertices.Count >= 3))
                    {
                        Debug.LogWarning("To create a capsule collider correctly using this method at least 3 vertices should be selected. See documentation for more info.");
                    }
                    CreateOrSetObjectToAttachColliderTo();
                    _easyColliderEditor.CreateCapsuleColliderAlternate(TransformToAttachCollidersTo);
                }
                if (GUILayout.Button(new GUIContent("Create Rotated Box Collider",
                                                    "Tries to create a Rotated Box Collider that contains the currently selected vertices. See documentation for vertex selection guide.")))
                {
                    if (!(_easyColliderEditor.SelectedVertices.Count == 4))
                    {
                        Debug.LogWarning("To create a rotated box collider correctly 4 vertices should be selected. See documentation for more info.");
                    }
                    //Rotated Colliders create their own object to attach to.
                    _easyColliderEditor.CreateRotatedBoxCollider(SelectedGameObject.transform);
                }
            }
            EditorGUILayout.LabelField("-Additional Toggles");
            //Preferences and Extras
            DisplayMeshVertexHandles         = EditorGUILayout.ToggleLeft(new GUIContent("显示网格顶点", "在所有当前可选的顶点上绘制Gizmo"), DisplayMeshVertexHandles);
            _easyColliderEditor.DrawVertices = DisplayMeshVertexHandles;
            IncludeMeshesFromChildren        = EditorGUILayout.ToggleLeft(new GUIContent("包括子网格", "包括子网格作为可能的顶点选择。"), IncludeMeshesFromChildren);
            if (IncludeMeshesFromChildren != _includeMeshesFromChildren)
            {
                _includeMeshesFromChildren = IncludeMeshesFromChildren;
                GameObjectSelectedHasChanged(); //allows regeneration of mesh lists to include/uninclude children.
            }
            EditorGUI.BeginChangeCheck();
            IsTrigger = EditorGUILayout.ToggleLeft(new GUIContent("Collider作为Trigger",
                                                                  "设置创建的Collider'Is Trigger'为TRUE"), IsTrigger);
            EditorGUI.EndChangeCheck();
            if (GUI.changed && _easyColliderEditor != null)
            {
                _easyColliderEditor.IsTrigger = IsTrigger;
            }
            if (GUILayout.Button(new GUIContent("移除对象所有Collider",
                                                "删除选定游戏对象上的所有Collider,包括在编辑之前存在的Collider。 如果启用了包括子网格物体,则删除所有子网格物体上的Collider")))
            {
                RemoveAllCollidersOnSelectedGameObject(_includeMeshesFromChildren);
            }
            if (_easyColliderPreferences != null)
            {
                _displayPreferences = EditorGUILayout.ToggleLeft(new GUIContent("Edit Preferences", "Enables editing of preferences"), _displayPreferences);
                if (_displayPreferences)
                {
                    _easyColliderPreferences.DisplayVerticesColour = EditorGUILayout.ColorField("Vertex Display Colour:",
                                                                                                _easyColliderPreferences.DisplayVerticesColour);
                    _easyColliderPreferences.DisplayVerticesScaling = EditorGUILayout.FloatField("Vertex Display Scaling:",
                                                                                                 _easyColliderPreferences.DisplayVerticesScaling);

                    _easyColliderPreferences.HoverVertColour = EditorGUILayout.ColorField("Hover Vertex Colour:",
                                                                                          _easyColliderPreferences.HoverVertColour);
                    _easyColliderPreferences.HoverVertScaling = EditorGUILayout.FloatField("Hover Vert Scaling:",
                                                                                           _easyColliderPreferences.HoverVertScaling);

                    _easyColliderPreferences.SelectedVertexColour = EditorGUILayout.ColorField("Selected Vertex Colour:",
                                                                                               _easyColliderPreferences.SelectedVertexColour);
                    _easyColliderPreferences.SelectedVertScaling = EditorGUILayout.FloatField("Selected Vertex Scaling:",
                                                                                              _easyColliderPreferences.SelectedVertScaling);

                    _easyColliderPreferences.OverlapSelectedVertColour =
                        EditorGUILayout.ColorField("Overlap Selected Vert Colour:",
                                                   _easyColliderPreferences.OverlapSelectedVertColour);
                    _easyColliderPreferences.OverlapSelectedVertScale =
                        EditorGUILayout.FloatField("Overlap Selected Vert Scale:",
                                                   _easyColliderPreferences.OverlapSelectedVertScale);

                    _easyColliderPreferences.VertSelectKeyCode = (KeyCode)EditorGUILayout.EnumPopup(new GUIContent("Vert Select KeyCode:", "Shortcut to use for selecting vertices."),
                                                                                                    _easyColliderPreferences.VertSelectKeyCode);
                    _easyColliderPreferences.SelectedColliderColour = EditorGUILayout.ColorField("Selected Collider Colour:",
                                                                                                 _easyColliderPreferences.SelectedColliderColour);


                    if (GUILayout.Button("Reset Preferences to Defaults"))
                    {
                        _easyColliderPreferences.SetDefaultValues();
                    }
                }
            }
            if (GUILayout.Button(new GUIContent("Finish Current GameObject",
                                                "Removes any required components that were added, Restores any disabled components, and resets for new gameobject selection.")))
            {
                OnDisable();
                SelectedGameObject = null;
            }
        }


        EditorGUILayout.LabelField("Quickstart:");
        EditorGUILayout.LabelField("1. Select object with mesh from scene hierarchy.");
        string key = "V"; //default

        if (_easyColliderPreferences != null)
        {
            key = _easyColliderPreferences.VertSelectKeyCode.ToString();
        }
        EditorGUILayout.LabelField("2. Enable vertex selection with the toggle beside it.");
        EditorGUILayout.LabelField("3. Select vertices by hovering over mesh in scene and pressing " + key + ".");
        EditorGUILayout.LabelField("4. Click buttons that appear after selection to create colliders.");
        EditorGUILayout.LabelField("5. Click Finish Current GameObject button when done creating colliders on an object.");
        EditorGUILayout.LabelField("5. For info on proper vertex selection see documentation .pdf in Assets/EasyColliderEditor", GUILayout.ExpandWidth(true));

        if (GUI.changed)
        {
            SceneView.RepaintAll();
        }
    }
Beispiel #2
0
    void OnGUI()
    {
        if (_easyColliderEditor == null)
        { //if the ECE gameobject gets deleted by the user, the object gets cleared, components restored, and everything is reset.
            //does sameactions as clicking button "Finish current gameobject".
            if (SelectedGameObject != null)
            {
                OnDisable();
                SelectedGameObject = null;
            }
            OnEnable();
        }
        EditorGUI.BeginChangeCheck(); //Check if selected game object has changed to update mesh vertices if it has.
        SelectedGameObject =
            (GameObject)
            EditorGUILayout.ObjectField("Selected Game Object:", SelectedGameObject, typeof(GameObject), true);
        EditorGUI.EndChangeCheck();
        if (GUI.changed)
        {
            if (SelectedGameObject != null)
            {
                if (!EditorUtility.IsPersistent(SelectedGameObject))
                {
                    GameObjectSelectedHasChanged();
                }
                else
                {
                    Debug.LogWarning("Selected Gameobject: " + SelectedGameObject.name +
                                     " is not active in the scene. Remember to use game objects from the scene heirarchy.");
                    SelectedGameObject = null;
                }
            }
            else
            {
                GameObjectSelectedHasChanged(); //Object has been reset to none by the user
            }
        }
        if (GameObjectIsActiveAndFromScene(ref SelectedGameObject))
        {
            if (MeshTransformList == null)//Preserves mesh transform list between script saves / updates.
            {
                GameObjectSelectedHasChanged();
            }
            EditorGUI.BeginChangeCheck();
            VertexSelectEnabled = EditorGUILayout.ToggleLeft(new GUIContent("Enable Vertex Select", "Enables viewport vertex selection by raycast"), VertexSelectEnabled);
            EditorGUI.EndChangeCheck();
            _easyColliderEditor.SelectVertByRaycast = VertexSelectEnabled;
            if (VertexSelectEnabled && GUI.changed)
            {
                _easyColliderEditor.SelectedVertices.Clear();
                if (EditorWindow.focusedWindow != SceneView.currentDrawingSceneView)
                {//Focuses the editor scene window if it is not currently focused.
                    if (SceneView.currentDrawingSceneView != null)
                    {
                        SceneView.currentDrawingSceneView.Focus();
                    }
                }
            }

            EditorGUI.BeginChangeCheck();
            ColliderSelectEnabled = EditorGUILayout.ToggleLeft(new GUIContent("Enable Collider Select", "Enables viewport selection of colliders for removal"), ColliderSelectEnabled);
            EditorGUI.EndChangeCheck();
            _easyColliderEditor.SelectColliderByRaycast = ColliderSelectEnabled;
            if (ColliderSelectEnabled && GUI.changed)
            {
                _easyColliderEditor.SelectedCollider = null;
                if (EditorWindow.focusedWindow != SceneView.currentDrawingSceneView)
                {//Focuses the editor scene window if it is not currently focused.
                    if (SceneView.currentDrawingSceneView != null)
                    {
                        SceneView.currentDrawingSceneView.Focus();
                    }
                }
            }
            if (_easyColliderEditor.SelectedCollider != null)
            {
                if (GUILayout.Button(new GUIContent("Remove Selected Collider", "Removes selected collider indicated by black cube at center of selected collider")))
                {
                    Undo.DestroyObjectImmediate(_easyColliderEditor.SelectedCollider);
                    _easyColliderEditor.SelectedCollider = null;
                }
            }

            //Which object to attach created colliders to. Changed to enum popup to improve UI/confusion by having multiple checkboxes where one has to be checked, enum works better for this.
            attachmentStyle = (AttachmentEnum)EditorGUILayout.EnumPopup(new GUIContent("Attach To:",
                                                                                       "Method to use to attach colliders, either attach to the selected gameobject (if possible), or a separate created child collider holder gameobject"), attachmentStyle);
            if (attachmentStyle == AttachmentEnum.ColliderHolders)
            {
                AttachToBaseObject           = false;
                AttachToColliderHolders      = true;
                TransformToAttachCollidersTo = null;
            }
            else if (attachmentStyle == AttachmentEnum.SelectedGameObject)
            {
                AttachToBaseObject           = true;
                AttachToColliderHolders      = false;
                TransformToAttachCollidersTo = SelectedGameObject.transform;
            }
            // attachmentStyle = (AttachmentEnum)EditorGUILayout.EnumMaskPopup(new GUIContent("Attach To:"), attachmentStyle);
            //EditorGUILayout.LabelField("Attach Colliders to:", GUILayout.ExpandWidth(false));
            //EditorGUI.BeginChangeCheck();
            //AttachToBaseObject = EditorGUILayout.ToggleLeft(new GUIContent("Selected GameObject",
            //    "Always attach created colliders to selected gameobject if possible."), AttachToBaseObject, GUILayout.ExpandWidth(false));
            //if (EditorGUI.EndChangeCheck())
            //{
            //    AttachToColliderHolders = false;
            //    TransformToAttachCollidersTo = SelectedGameObject.transform;

            //}
            //EditorGUI.BeginChangeCheck();
            //AttachToColliderHolders = EditorGUILayout.ToggleLeft(new GUIContent("ColliderHolders",
            // "Attachs created colliders to a child gameobject that is created named Collider Holder that will have created colliders attached."), AttachToColliderHolders, GUILayout.ExpandWidth(false));
            //if (EditorGUI.EndChangeCheck())
            //{
            //    AttachToBaseObject = false;
            //    TransformToAttachCollidersTo = null;
            //}
            //if (!AttachToBaseObject) //defaults to collider holder useage if the others aren't enabled.
            //{
            //    AttachToColliderHolders = true;
            //    TransformToAttachCollidersTo = null;
            //}

            //collider creation buttons on editor window show up only after vertices are selected.
            if (_easyColliderEditor.SelectedVertices.Count > 0)
            {
                if (GUILayout.Button(new GUIContent("Create Box Collider",
                                                    "Creates a Box Collider that contains the currently selected vertices. See documentation for vertex selection guide.")))
                {
                    if (_easyColliderEditor.SelectedVertices.Count <= 1)
                    {
                        Debug.LogWarning("To create a box collider correctly at least vertices should be selected. See documentation for for more info.");
                    }
                    CreateOrSetObjectToAttachColliderTo();
                    _easyColliderEditor.CreateBoxCollider(TransformToAttachCollidersTo);
                }
                if (GUILayout.Button(new GUIContent("Create Sphere Collider",
                                                    "Creates a Sphere Collider that contains the currently selected vertices. See documentation for vertex selection guide.")))
                {
                    if (_easyColliderEditor.SelectedVertices.Count <= 1)
                    {
                        Debug.LogWarning("To create a sphere collider at least 2 vertices should be selected. See documentation for more info.");
                    }
                    CreateOrSetObjectToAttachColliderTo();
                    _easyColliderEditor.CreateSphereCollider(TransformToAttachCollidersTo);
                }
                if (GUILayout.Button(new GUIContent("Create Capsule Collider",
                                                    "Creates a Capsule Collider that contains the currently selected vertices. See documentation for vertex selection guide.")))
                {
                    if (!(_easyColliderEditor.SelectedVertices.Count == 3))
                    {
                        Debug.LogWarning("To create a capsule collider correctly 3 vertices should be selected. See documentation for more info.");
                    }
                    CreateOrSetObjectToAttachColliderTo();
                    _easyColliderEditor.CreateCapsuleCollider(TransformToAttachCollidersTo);
                }
                if (GUILayout.Button(new GUIContent("Create Capsule Collider Alternate",
                                                    "Creates a Capsule Collider that contains the currently selected vertices. See documentation for vertex selection guide.")))
                {
                    if (!(_easyColliderEditor.SelectedVertices.Count >= 3))
                    {
                        Debug.LogWarning("To create a capsule collider correctly using this method at least 3 vertices should be selected. See documentation for more info.");
                    }
                    CreateOrSetObjectToAttachColliderTo();
                    _easyColliderEditor.CreateCapsuleColliderAlternate(TransformToAttachCollidersTo);
                }
                if (GUILayout.Button(new GUIContent("Create Rotated Box Collider",
                                                    "Tries to create a Rotated Box Collider that contains the currently selected vertices. See documentation for vertex selection guide.")))
                {
                    if (!(_easyColliderEditor.SelectedVertices.Count == 4))
                    {
                        Debug.LogWarning("To create a rotated box collider correctly 4 vertices should be selected. See documentation for more info.");
                    }
                    //Rotated Colliders create their own object to attach to.
                    _easyColliderEditor.CreateRotatedBoxCollider(SelectedGameObject.transform);
                }
            }
            EditorGUILayout.LabelField("-Additional Toggles");
            //Preferences and Extras
            DisplayMeshVertexHandles         = EditorGUILayout.ToggleLeft(new GUIContent("Display Mesh Vertices", "Draws a gizmo over all currently selectable vertices."), DisplayMeshVertexHandles);
            _easyColliderEditor.DrawVertices = DisplayMeshVertexHandles;
            IncludeMeshesFromChildren        = EditorGUILayout.ToggleLeft(new GUIContent("Include Child Meshes", "Includes child meshes as possible vertex selections."), IncludeMeshesFromChildren);
            if (IncludeMeshesFromChildren != _includeMeshesFromChildren)
            {
                _includeMeshesFromChildren = IncludeMeshesFromChildren;
                GameObjectSelectedHasChanged(); //allows regeneration of mesh lists to include/uninclude children.
            }
            EditorGUI.BeginChangeCheck();
            IsTrigger = EditorGUILayout.ToggleLeft(new GUIContent("Create Collider as Trigger",
                                                                  "Sets the created colliders 'Is Trigger' field to this value on creation"), IsTrigger);
            EditorGUI.EndChangeCheck();
            if (GUI.changed && _easyColliderEditor != null)
            {
                _easyColliderEditor.IsTrigger = IsTrigger;
            }
            if (GUILayout.Button(new GUIContent("Remove all Colliders on Selected GameObject",
                                                "Removes all colliders on selected gameobject, including ones that were present before editing. Removes colliders on ALL children if include child meshes is enabled")))
            {
                RemoveAllCollidersOnSelectedGameObject(_includeMeshesFromChildren);
            }
            if (_easyColliderPreferences != null)
            {
                _displayPreferences = EditorGUILayout.ToggleLeft(new GUIContent("Edit Preferences", "Enables editing of preferences"), _displayPreferences);
                if (_displayPreferences)
                {
                    _easyColliderPreferences.DisplayVerticesColour = EditorGUILayout.ColorField("Vertex Display Colour:",
                                                                                                _easyColliderPreferences.DisplayVerticesColour);
                    _easyColliderPreferences.DisplayVerticesScaling = EditorGUILayout.FloatField("Vertex Display Scaling:",
                                                                                                 _easyColliderPreferences.DisplayVerticesScaling);

                    _easyColliderPreferences.HoverVertColour = EditorGUILayout.ColorField("Hover Vertex Colour:",
                                                                                          _easyColliderPreferences.HoverVertColour);
                    _easyColliderPreferences.HoverVertScaling = EditorGUILayout.FloatField("Hover Vert Scaling:",
                                                                                           _easyColliderPreferences.HoverVertScaling);

                    _easyColliderPreferences.SelectedVertexColour = EditorGUILayout.ColorField("Selected Vertex Colour:",
                                                                                               _easyColliderPreferences.SelectedVertexColour);
                    _easyColliderPreferences.SelectedVertScaling = EditorGUILayout.FloatField("Selected Vertex Scaling:",
                                                                                              _easyColliderPreferences.SelectedVertScaling);

                    _easyColliderPreferences.OverlapSelectedVertColour =
                        EditorGUILayout.ColorField("Overlap Selected Vert Colour:",
                                                   _easyColliderPreferences.OverlapSelectedVertColour);
                    _easyColliderPreferences.OverlapSelectedVertScale =
                        EditorGUILayout.FloatField("Overlap Selected Vert Scale:",
                                                   _easyColliderPreferences.OverlapSelectedVertScale);

                    _easyColliderPreferences.VertSelectKeyCode = (KeyCode)EditorGUILayout.EnumPopup(new GUIContent("Vert Select KeyCode:", "Shortcut to use for selecting vertices."),
                                                                                                    _easyColliderPreferences.VertSelectKeyCode);
                    _easyColliderPreferences.SelectedColliderColour = EditorGUILayout.ColorField("Selected Collider Colour:",
                                                                                                 _easyColliderPreferences.SelectedColliderColour);


                    if (GUILayout.Button("Reset Preferences to Defaults"))
                    {
                        _easyColliderPreferences.SetDefaultValues();
                    }
                }
            }
            if (GUILayout.Button(new GUIContent("Finish Current GameObject",
                                                "Removes any required components that were added, Restores any disabled components, and resets for new gameobject selection.")))
            {
                OnDisable();
                SelectedGameObject = null;
            }
        }


        EditorGUILayout.LabelField("Quickstart:");
        EditorGUILayout.LabelField("1. Select object with mesh from scene hierarchy.");
        string key = "V"; //default

        if (_easyColliderPreferences != null)
        {
            key = _easyColliderPreferences.VertSelectKeyCode.ToString();
        }
        EditorGUILayout.LabelField("2. Enable vertex selection with the toggle beside it.");
        EditorGUILayout.LabelField("3. Select vertices by hovering over mesh in scene and pressing " + key + ".");
        EditorGUILayout.LabelField("4. Click buttons that appear after selection to create colliders.");
        EditorGUILayout.LabelField("5. Click Finish Current GameObject button when done creating colliders on an object.");
        EditorGUILayout.LabelField("5. For info on proper vertex selection see documentation .pdf in Assets/EasyColliderEditor", GUILayout.ExpandWidth(true));

        if (GUI.changed)
        {
            SceneView.RepaintAll();
        }
    }