/// <summary> /// When the user is changing node type, e.g., between fixed and winch, /// we receive a callback handling winch dependencies. /// </summary> private void OnNodeType() { if (m_winch != null) { if (Wire == null || Type != Wire.NodeType.WinchNode) { ScriptComponent.DestroyImmediate(m_winch); m_winch = null; } } else if (Wire != null && Type == Wire.NodeType.WinchNode) { m_winch = Wire.gameObject.AddComponent <WireWinch>(); m_winch.Wire = Wire; } }
public void Unregister(ScriptComponent component) { }