vrchat-community / osc

Files and Info on using OSC to communicate with VRChat
MIT License
234 stars 5 forks source link

Booleans are not sent properly. they return as an empty string when TRUE #18

Closed brandonvdongen closed 2 years ago

brandonvdongen commented 2 years ago

Describe the bug Using the C# OSC package suggested in the docs When trying receive a boolean value with it, the value always returns as a False

After further investigation it seems that a 'true' boolean returns a empty string instead. which is why all numerical value types resolve to a 0 or false but a string returns a empty string when the boolean is true.

To Reproduce just use the standard OSC receiver example scene to try receive a value (/avatar/parameters/MuteSelf in the test case) run the scene with the code I've attached bellow and you'll see that when receiving the message it reports as a 'altstring' instead of the 'TRUE' type it's supposed to have.

Expected behavior Boolean returns TRUE if enabled in vrchat.

Screenshots Screenshot

Info (please complete the following information):

Below is the test code i used to debug the output and it appears that the 'true' state of a boolean returns as a empty string instead, causing it to always report as false in any other value type. OSCTest.txt (had to rename it to .txt as github doesn't allow .cs)

brandonvdongen commented 2 years ago

After some further testing this seems to be a problem with OSCCore and not VRChat as running Rug.OSC returns true/false properly.

momo-the-monster commented 2 years ago

@brandonvdongen - you're correct! Fixed in #41