UnityOSC
UnityOSC copied to clipboard
receive "string"
Hello, is it possible to receive strings ? I couldn't find anything.
thanks!
I believe I did not implement that.
Hey! I just added it no problem. Thanks! On Thu, May 3, 2018 at 14:19 Thomas O Fredericks [email protected] wrote:
I believe I did not implement that.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/thomasfredericks/UnityOSC/issues/8#issuecomment-386439993, or mute the thread https://github.com/notifications/unsubscribe-auth/ACweTMQcL0YmNpXhXnYhlo5hO8SYkUWoks5tu3RkgaJpZM4TxaSP .
Do you mind sharing your implementation? Thanks.
sorry, i dont have the files with me atm, i will forward as soon i have my end on it. but it was literally one line..
On Thu, Jul 5, 2018 at 2:29 PM Thomas O Fredericks [email protected] wrote:
Do you mind sharing your implementation? Thanks.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/thomasfredericks/UnityOSC/issues/8#issuecomment-402812964, or mute the thread https://github.com/notifications/unsubscribe-auth/ACweTINot_13VUp8SSVBFdIeBmnEmEYXks5uDlsQgaJpZM4TxaSP .
hi freekatet, if you manage to find the lines you were talking about to receive string objects, i'd be really interested, thanks !
nevermind, just add the following in the OscMessage class (after GetInt and GetFloat) and it should work
public string GetString(int index)
{
if (values[index].GetType() == typeof(string))
{
string data = (string)values[index];
//if (Double.IsNaN(data)) return 0f;
return data;
}
else
{
Debug.Log("Wrong type");
return "";
}
}