Skip to content

Commit 81d574a

Browse files
committed
Changed instantiation data throw by an error log
1 parent 3fad66c commit 81d574a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public void SetInstantiationData<T>(NetworkObject networkObject, T data) where T
140140
{
141141
if (!TryGetHandlerWithData(networkObject.GlobalObjectIdHash, out var prefabHandler) || !prefabHandler.HandlesDataType<T>())
142142
{
143-
throw new Exception("[InstantiationData] Cannot inject data: no compatible handler found for the specified data type.");
143+
Debug.LogError("[InstantiationData] Cannot inject data: no compatible handler found for the specified data type.");
144144
}
145145

146146
using var writer = new FastBufferWriter(4, Collections.Allocator.Temp, int.MaxValue);

0 commit comments

Comments
 (0)