How To create Progress bar for Photon connection unity?
To know connection details we all use this line GUILayout.Label ("" + PhotonNetwork.connectionStateDetailed);
This is working fine. I want to create a progress bar for this. i mean i need this details into percentage. then i can create progress bar easily.
Thank you
Answer by ChristianSimon · Mar 16, 2017 at 08:58 AM
Hi,
as you already mentioned using PhotonNetwork.connectionStateDetailed is a good point to start. This returns a ClientState, you can take a look into that by opening the NetworkingPeer class. Then you can choose the entries - they are all described - you need and map them somehow to a percentage value which you can turn into a progress bar. For example if PhotonNetwork.connectionStateDetailed is PeerCreated you can map that to a percentage value of your choice based on how many connecting steps you have.
Your answer
Follow this Question
Related Questions
How can we make 1v1 game with photon network 1 Answer
PhotonOnSerializeView() Only working sometimes 0 Answers
Photon RPC Only Working Halfway 1 Answer
Match making in Photon 0 Answers