IsPlayerInVR crashes in Play Mode in Unity.
closed
Whaddageek
When testing in Unity, Play Mode will cause any instance of IsPlayerInVR to crash out.
This should ideally return false by default so it can be used for testing purposes.
Log In
_
_tau_
closed
StormRel
tracked
StormRel
needs more information
Hello! Thanks for reporting this. Could you confirm this issue is still occurring?
Whaddageek
StormRel I'll open Unity tomorrow and confirm for you.
Whaddageek
StormRel This bug is still occuring.
_
_tau_
Whaddageek: Which version of the SDK are you testing with? Do you have ClientSim enabled?
Whaddageek
_tau_ Clientsim is disabled, or at least toggled off, and v3.5.2.
_
_tau_
Whaddageek Player APIs only function in editor when ClientSim is active. That's the main purpose of it. Please enable ClientSim and test your scripts again!
Whaddageek
_tau_There are times when you want to just test functions in Play Mode without being a player though. This is something that could be resolved by just making error handling return a Bool value of False instead of Null, because that's what breaks it.
_
_tau_
Whaddageek This is not the only function that would break in such a way, and we currently don't have plans to support running VRC specific APIs in Udon without ClientSim enabled.
If you _need_ this to work, you can always shim the function yourself by assigning the right delegate function like ClientSim does too.