private void CreateHighlightersInEditor()
        {
            //Only run if it's in the editor
            if (Utilities.IsEditTime())
            {
                //Generate the main highlight object
                GenerateHighlightObject();

                //If a joint is being used but no joint is found then throw a warning in the console
                if (snapType == SnapTypes.Use_Joint && GetComponent <Joint>() == null)
                {
                    Debug.LogWarning("A Joint Component is required on the SnapDropZone GameObject called [" + name + "] because the Snap Type is set to `Use Joint`.");
                }

                //Generate the editor highlighter object with the custom material
                GenerateEditorHighlightObject();

                //Ensure the game object references are force set based on whether they exist in the path
                ForceSetObjects();

                //Show the editor highlight object if it's set.
                if (highlightEditorObject)
                {
                    highlightEditorObject.SetActive(displayDropZoneInEditor);
                }
            }
        }
 private void ChooseDestroyType(Component deleteComponent)
 {
     if (Utilities.IsEditTime())
     {
         if (deleteComponent)
         {
             DestroyImmediate(deleteComponent);
         }
     }
     else
     {
         if (deleteComponent)
         {
             Destroy(deleteComponent);
         }
     }
 }
 private void ChooseDestroyType(GameObject deleteObject)
 {
     if (Utilities.IsEditTime())
     {
         if (deleteObject)
         {
             DestroyImmediate(deleteObject);
         }
     }
     else
     {
         if (deleteObject)
         {
             Destroy(deleteObject);
         }
     }
 }