Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

receive "string" #8

Open
freekatet opened this issue May 3, 2018 · 6 comments
Open

receive "string" #8

freekatet opened this issue May 3, 2018 · 6 comments

Comments

@freekatet
Copy link

Hello,
is it possible to receive strings ? I couldn't find anything.

thanks!

@thomasfredericks
Copy link
Owner

I believe I did not implement that.

@freekatet
Copy link
Author

freekatet commented May 3, 2018 via email

@thomasfredericks
Copy link
Owner

Do you mind sharing your implementation? Thanks.

@freekatet
Copy link
Author

freekatet commented Jul 24, 2018 via email

@Loupv
Copy link

Loupv commented Apr 10, 2019

hi freekatet, if you manage to find the lines you were talking about to receive string objects, i'd be really interested, thanks !

@Loupv
Copy link

Loupv commented Apr 10, 2019

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 "";
        }
    }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants