I'm trying to do some object pooling in my networked game. I'm following this piece of documentation.
The issue is: how do I set the right rotation to the pooled object? The delegate gives me the spawn position, but no rotation.
The objects I'm pooling don't have synced transform.
Any solutions/ideas?
EDIT: I gave Unity feedback regarding the SpawnDelegate signature that is the root of my issue. https://feedback.unity3d.com/suggestions/spawndelegate-signature
EDIT2: I read a bit the decompiled code of UNET and maybe the solution could be customizing the serialization/deserialization of the objects and adding the rotation (OnSerialize/OnDeserialize). Adding a SyncVar would be the same I think but at an higher abstraction level. From the software engineering standpoint I don't like the idea of adding a component for this basic functionality.
EDIT3:
This is the UNET decompiled repo. I cannot understand how the rotation is set correctly when spawning with default spawners. For default I mean when you register the prefabs with ClientScene.RegisterPrefab