NullRef inside NetworkScene

Hi,

We are having this issue with ClientScene.FindLocalObject causing a NullReferenceException. The NetworkInstanceId passed is checked to verify if it is valid.

NullReferenceException: Object reference not set to an instance of an object
UnityEngine.Networking.NetworkScene.FindLocalObject (NetworkInstanceId netId) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkScene.cs:57)
UnityEngine.Networking.ClientScene.FindLocalObject (NetworkInstanceId netId) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/ClientScene.cs:354)

yeah, you are looking up a GameObject that has been deleted. It should just return null.

I filed bug 711271 on this.

1 Like

You could put a try/catch block around that lookup as a workaround.