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