Skip to content

Commit e944ede

Browse files
committed
Add missing documentation to NetworkPrefabInstanceHandlerWithData
1 parent 1b37f13 commit e944ede

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ public bool AddHandler(uint globalObjectIdHash, INetworkPrefabInstanceHandler in
7676

7777

7878
/// <inheritdoc cref="SetInstantiationData{T}(NetworkObject, T)"/>
79-
/// <typeparam name="T"> The type of instantiation data, which must be a struct implementing <see cref="INetworkSerializable"/>.</typeparam>
8079
/// <param name="gameObject">
8180
/// The <see cref="GameObject"/> containing a <see cref="NetworkObject"/> to which the instantiation data will be assigned. The <see cref="NetworkObject.GlobalObjectIdHash"/> must match a handler that was previously registered.
8281
/// </param>

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@ namespace Unity.Netcode
44
{
55
/// <summary>
66
/// Specialized version of <see cref="INetworkPrefabInstanceHandler"/> that receives
7-
/// custom instantiation data injected by the server before spawning.
7+
/// custom instantiation data injected by the authority before spawning.
88
/// </summary>
9+
/// <typeparam name="T"> The type of the instantiation data. Must be a struct implementing <see cref="INetworkSerializable"/>.</typeparam>
10+
/// <remarks>
11+
/// Use <see cref="NetworkPrefabHandler.SetInstantiationData{T}(NetworkObject, T)"/> or <see cref="NetworkPrefabHandler.SetInstantiationData{T}(GameObject, T)"/>
12+
/// on the authority side to set instantiation data before spawning an object or synchronizing a client. The data set on the authority will then be passed into the <see cref="NetworkPrefabInstanceHandlerWithData{T}.Instantiate"/> call.
13+
/// </remarks>
914
public abstract class NetworkPrefabInstanceHandlerWithData<T> : INetworkPrefabInstanceHandlerWithData where T : struct, INetworkSerializable
1015
{
1116
/// <inheritdoc cref="INetworkPrefabInstanceHandler.Instantiate"/>

0 commit comments

Comments
 (0)