public override void enableForEditor() { part.OnEditorAttach += OnEditorAttach; part.OnEditorDetach += OnEditorDetach; if (part.parent) hub = part.parent.GetComponent<ProceduralRingHub>(); if (hub && !part.isClone) createOutline(); }
public void OnEditorAttach() { hub = part.parent.GetComponent<ProceduralRingHub>(); if (hub != null) { log("parent {0} {1}", part.parent.partName, part.parent.name); createOutline(); } else { if (part.symmetryMode > 0) return; alert("HyperRing Struts only work when attached to a HyperRing Hub", 2); } }
public override void OnDestroy() { hub = null; destroyOutline(); }
public void OnEditorDetach() { hub = null; destroyOutline(); }