Skip to content

Commit f0d49aa

Browse files
committed
insight on INetworkInstantiationPayloadSynchronizer in the INetworkPrefabInstanceHandler.Instantiate() documentation
1 parent 7f395ba commit f0d49aa

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

com.unity.netcode.gameobjects/Runtime/Spawning/NetworkPrefabHandler.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ public interface INetworkPrefabInstanceHandler
2020
///
2121
/// Note on Pooling: If you are using a NetworkObject pool, don't forget to make the NetworkObject active
2222
/// via the <see cref="GameObject.SetActive(bool)"/> method.
23+
///
24+
/// If you need to pass custom data at instantiation time (e.g., selecting a variant, setting initialization parameters, or choosing a pre-instantiated object),
25+
/// implement <see cref="INetworkInstantiationPayloadSynchronizer"/> alongside this interface to receive the data before instantiation.
2326
/// </summary>
2427
/// <param name="ownerClientId">the owner for the <see cref="NetworkObject"/> to be instantiated</param>
2528
/// <param name="position">the initial/default position for the <see cref="NetworkObject"/> to be instantiated</param>

0 commit comments

Comments
 (0)