You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.
In Unity v2017.2.0f3, when an OSC message is received succesfully but results in an error in Unity, a loop occurs somewhere where the OSC message is sent again or reprocessed which results in an error....
Below is some simple code which reproduces the issue
// OSCMessageReceiver// Unity code where an incoming OSC message comes inusingSystem.Collections;usingSystem.Collections.Generic;usingUnityEngine;publicclassOSCMessageReceiver:MonoBehaviour{publicOSCosc;publicint[]numbers=newint[0];// Use this for initializationvoidStart(){osc.SetAddressHandler("/filter",OnReceiveFilter);}// Update is called once per framevoidUpdate(){}voidOnReceiveFilter(OscMessagemessage){intx=message.GetInt(0);Debug.Log(x);Debug.LogError(numbers[x]);}}
# Python code that sends an OSC messageimportargparseimportrandomimporttimefrompythonoscimportudp_clientif__name__=="__main__":
parser=argparse.ArgumentParser()
parser.add_argument("--ip", default="127.0.0.1",
help="The ip of the OSC server")
parser.add_argument("--port", type=int, default=6969,
help="The port the OSC server is listening on")
args=parser.parse_args()
client=udp_client.SimpleUDPClient(args.ip, args.port)
msg=5client.send_message("/filter", msg)
In the above example, the Python script sends a message to OSCMessageReceiver to display the 6th item in the array numbers which is out of range and triggers an error inside Unity. As a result the aforementioned loop occurs. This issue is not fatal and does not crash Unity nor hinder gameplay as far as I can tell, but it does flood the console with error messages.
The text was updated successfully, but these errors were encountered:
In Unity v2017.2.0f3, when an OSC message is received succesfully but results in an error in Unity, a loop occurs somewhere where the OSC message is sent again or reprocessed which results in an error....
Below is some simple code which reproduces the issue
In the above example, the Python script sends a message to OSCMessageReceiver to display the 6th item in the array
numbers
which is out of range and triggers an error inside Unity. As a result the aforementioned loop occurs. This issue is not fatal and does not crash Unity nor hinder gameplay as far as I can tell, but it does flood the console with error messages.The text was updated successfully, but these errors were encountered: