morikatron/toio-sdk-for-unity

Specify toio ID in Unity

Logenleedev opened this issue · 1 comments

Hi there. I saw that right now the Unity SDK can connect multiple cubes. However, I was wondering can I specify each cubes movement using the id #?

For example, imagine we have a list Cube[] cubes;

How can I do sth like cubes[0].move, cubes[1].move .....

@Logenleedev
Sorry for late response.
Cube class has an "id" property, which identifies cubes (hardware).
So you could use if-sentence to control a sepcific cube, or just convert the connected Cube[] to a Dictionary<str, Cube> for convenience.