Utilities.IsValid(Networking.LocalPlayer) returns false
Guribo opened this issue · 4 comments
Guribo commented
This is not happening in VRChat but only in the Unity editor.
It can easily be tested with a simple U# script containing e.g. the following:
private void Update()
{
if (Networking.LocalPlayer != null)
{
Debug.Log("Local player is not null");
}
if (!Utilities.IsValid(Networking.LocalPlayer))
{
Debug.LogError("Local player is not valid");
}
}
Tested with Cyan Emu v0.3.4 Beta and Udon Sharp v0.19.5.
CyanLaser commented
Thank you for finding this. I'll look into it. Do you know of any other items that might have improper IsValid implementation?
Guribo commented
So far I only noticed it for VRCPlayerApis, I will let you know when I find others.
Guribo commented
It is working now. Thanks!