public override void OnRemoveConnection(NodePort port) { if (port.fieldName == "Receiver") { Receiver = null; } }
public override void OnCreateConnection(NodePort from, NodePort to) { if (to.fieldName == "Receiver") { Receiver = GetInputPort("Receiver").GetInputValue <OSC.Receiver>(); } }
public void Bind(OSC.Receiver receiver, string address) { Receiver = receiver; this.address = address; OSC.ChannelIn[] channels = receiver.GetComponents <OSC.ChannelIn>(); bool found = false; foreach (OSC.ChannelIn channel2 in channels) { if (channel2.address == address) { channel = channel2; found = true; break; } } if (!found) { if (channel == null || channel.gameObject != receiver.gameObject) { channel = receiver.gameObject.AddComponent <OSC.ChannelIn>(); } channel.address = this.address; } channel.receiver = receiver; }
public void Bind(GameObject go, bool force = false) { if (force || (go != null && (go != gameObject))) { //initialized = false; gameObject = go; name = "OSC "; Connection = gameObject.GetComponent <OSC.Connection>(); Sender = gameObject.GetComponent <OSC.Sender>(); Receiver = gameObject.GetComponent <OSC.Receiver>(); initialized = true; } }
public void Link() { Receiver = GetInputPort("Receiver").GetInputValue <OSC.Receiver>(); }