void Update() { // Create a test value. Vector2 value = Random.insideUnitCircle; // Use SetAsBlob to write a Vector2 value in a byte blob. _message.SetBlob(0, value); // Send. _oscOut.Send(_message); // Log. Debug.Log("Sending: " + value + "\n"); }
void Update() { // Create a test value. Quaternion value = Random.rotation; // Use SetAsBlob to write a Quaternion value in a byte blob. _message.SetBlob(0, value); // Send. _oscOut.Send(_message); // Log. Debug.Log("Sending: " + value + "\n"); }
void Update() { // Create a test value. Vector4 value = new Vector4(Random.value, Random.value, Random.value, Random.value); // Use SetAsBlob to write a Vector4 value in a byte blob. _message.SetBlob(0, value); // Send. _oscOut.Send(_message); // Log. Debug.Log("Sending: " + value + "\n"); }
void Update() { // Update test text content. int tempI = Random.Range(0, _sendText.Length); char tempChar = _sendText[tempI]; _sendText = _sendText.Remove(tempI, 1); _sendText = _sendText.Insert(Random.Range(0, _sendText.Length), tempChar.ToString()); // Use SetAsBlob to write a utf-8 string to a byte blob. _message.SetBlob(0, System.Text.Encoding.UTF8, _sendText); // Send. _oscOut.Send(_message); // Log. Debug.Log("Sending: " + _sendText + "\n"); }
void Update() { // Update test list with new content. _sendFloats.Clear(); int randomCount = Random.Range(1, 5); for (int i = 0; i < randomCount; i++) { _sendFloats.Add(Random.value); } // Use SetAsBlob to write list of floats to a byte blob. _message.SetBlob(0, _sendFloats); // Send. _oscOut.Send(_message); // Log. Debug.Log("Sending: " + ListToString(_sendFloats) + "\n"); }