protected override void OnOSCMessage(OSCMessage message, WSServiceBehaviour beh) { if (message.Address == oscRequestFrame) { SendFrame(beh); } else if (message.Address == oscSetResolution) { SetResolution(message.GetInt(0), message.GetInt(1), message.GetInt(2)); } }
protected override void OnOSCMessage(OSCMessage message) { // DebugClient("recienig mes addr " + message.Address + " type " + message.typeTag); if (message.Address == "/depth") { dimensions = new Vector2Int(message.GetInt(0), message.GetInt(1)); byte[] data = message.GetBytes(2); CreateParticles(data); if (points == null || points.Length != dimensions.x * dimensions.y) { points = new ParticleSystem.Particle[dimensions.x * dimensions.y]; ClearParticles(); } // Debug.Log("dimensionsa re " + dimensions + " len = " + data.Length + " should be " + dimensions.x * dimensions.y * 2); } else { DebugClient("unknown address " + message.Address); } }
public void OnMessage(OSCMessage msg) { Debug.Log("setup recieving typetag " + msg.typeTag); if (!msg.Address.StartsWith(messagePrefix)) { return; } if (msg.typeTag.StartsWith(",si")) { string adr = null; int index = 0; adr = msg.GetString(ref index); int port = msg.GetInt(ref index); if (targetSelector.valueSource != null) { targetSelector.valueSource.AddTarget(adr, port); } Debug.Log("^trying to ad target " + adr + ":" + port); } }