Open joshturb opened 2 months ago
Hi @joshturb To better understand this issue, could you provide:
NetworkBehaviour
that contains the NetworkVariable
property (or an example of that class/script)NetworkBehaviour
or MonoBehaviour
that was invoking NetworkObject.InstantiateAndSpawn
or NetworkSpawnManager.InstantiateAndSpawn
(or a culled version of that class/script so I can understand at what point this is being invoked).The above information will help me replicate the issue on my end.
Description
OverFlowException when instantiating a object with networkvariables on it, using InstantiateAndSpawn when host is dedicated server
Reproduce Steps
Actual Outcome
OverflowException: Reading past the end of the buffer, Error server spawns player but chokes on the declaration of the networkvariable no matter what the network variable is it will not work, unless it was a scene object.
Expected Outcome
It behaves normally initializing the network variable
Environment
Additional Context
It was fixed by instantiating then using obj.SpawnAsPlayer(clientId) instead of InstantiateAndSpawn
Full Error: