//-------------------------------------------------
 void OnEnable()
 {
     if (Selection.activeTransform != null)
     {
         TeleportAreaCustom TeleportAreaCustom = Selection.activeTransform.GetComponent <TeleportAreaCustom>();
         if (TeleportAreaCustom != null)
         {
             TeleportAreaCustom.UpdateVisualsInEditor();
         }
     }
 }
        //-------------------------------------------------
        public override void OnInspectorGUI()
        {
            DrawDefaultInspector();

            if (Selection.activeTransform != null)
            {
                TeleportAreaCustom TeleportAreaCustom = Selection.activeTransform.GetComponent <TeleportAreaCustom>();
                if (GUI.changed && TeleportAreaCustom != null)
                {
                    TeleportAreaCustom.UpdateVisualsInEditor();
                }
            }
        }