Spawn message: always Traditional

This commit is contained in:
mischa 2024-07-15 13:24:14 +02:00
parent e04122d0de
commit 5097d82707

View File

@ -1368,7 +1368,8 @@ static ArraySegment<byte> CreateSpawnMessagePayload(bool isOwner, NetworkIdentit
// serialize all components with initialState = true
// (can be null if has none)
identity.SerializeServer(true, ownerWriter, observersWriter);
// SyncMethod doesn't matter for initialState, since everything is included
identity.SerializeServer(true, SyncMethod.Traditional, ownerWriter, observersWriter);
// convert to ArraySegment to avoid reader allocations
// if nothing was written, .ToArraySegment returns an empty segment.