Example #1
0
 //-------------------------------------------------
 void OnEnable()
 {
     if (Selection.activeTransform)
     {
         TeleportPoint teleportPoint = Selection.activeTransform.GetComponent <TeleportPoint>();
         teleportPoint.UpdateVisualsInEditor();
     }
 }
Example #2
0
 public override void OnInspectorGUI()
 {
     DrawDefaultInspector();
     if (Selection.activeTransform)
     {
         TeleportPoint teleportPoint = Selection.activeTransform.GetComponent <TeleportPoint>();
         if (GUI.changed)
         {
             teleportPoint.UpdateVisualsInEditor();
         }
     }
 }