I am searching a way to create GUI content on fly. I need create a list with some button matches to network devices reveled by a broadcast.
I do think it’s possible to do it only with the OnGUI method.
Is it possible to do it and how?
I am searching a way to create GUI content on fly. I need create a list with some button matches to network devices reveled by a broadcast.
I do think it’s possible to do it only with the OnGUI method.
Is it possible to do it and how?
Sure, process your network broadcast results into a collection of button labels, then in OnGUI() iterate through that collection calling GUI.Button() for each item. If you’re still stuck, post the code you have so far and what you’re having difficulty with.
Thx for your answer, I think it works but I have an issue with the broadcast doesn’t seem works.
I am using this method to broadcast :
networkView.BroadcastMessage("discovery", data);
I haven’t used Unity’s networking layer; for questions about that I’d recommend posting here.