public InstanceItemView Instance(InstanceItem instance) { this.instance = instance; instanceName.Text(instance.name); category.Category(instance.category); return(this); }
void OnSetAsSnap(InstanceItem item) { if (snapTargetInstance != null) { snapTargetInstancePrevious = snapTargetInstance; Color highlightColor3 = new Color(0, 0, 0, 0); snapTargetInstance.HighlightObject(highlightColor3); } snapTargetInstance = item.instance; Color highlightColor4 = XKCDColors.RedPink; snapTargetInstance.HighlightObject(highlightColor4); }
void OnSelect(InstanceItem item) { var instance = item.instance; EditorGUI.CloseEditors(); if (!EditorGUI.instance.IsOpen()) { EditorGUI.instance.Open(); } if (selectedObject != null) { selectedObject.HighlightObject(UnityEngine.Color.clear); selectedObject = instance; } if (snapTargetInstance == instance) { snapTargetInstance = null; } KerbalKonstructs.SelectInstance(instance, false); instance.HighlightObject(XKCDColors.Green_Yellow); }