Hi all. I wanted to ask if anyone knows how to check if a player is using a android device or a PC?
Since I wanted to make a player list that will display if a player is in android.
I’m using udonsharp for this. Thank you!
A fairly simple solution, you could have your script have a public boolean that you set in the inspector. Since you upload two different versions for PC and Quest, you could change this variable depending on the world type. Not the best solution, but it could work!
You could sync this value over the network too. Maybe having an array of GameObjects with attached scripts, each owned by each user and their platform shared. I could imagine the manager for this being a little confusing and complex, making sure that when players leave, they are marked as unclaimed and returned to the master for reuse. Making sure to handle when the master leaves too.
Using the preprocessor works well.
#if UNITY_ANDROID
public const Boolean IsQuest = true;
public const String DeviceName = "Quest";
#else
public const Boolean IsQuest = false;
public const String DeviceName = "PCVR";
#endif
public const Boolean IsPCVR = !IsQuest;
Sorry it took awhile didn’t know that people would respond but thanks guys will try out.
I’m not sure if i should create a new topic but I would also like to ask if you guys happen to know how to check if you are still connected in the internet or in VRC server? Since Networking.IsNetworkSettled doesn’t work (Or i’m not using it as intended). Thank you
Like people are walking around in a world and you would detect that the Internet is down for a player or VRC’s servers are not responding? And then you do what?
I can’t see how this could be handled in any meaningful way.