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