@@ -754,13 +754,13 @@ public NetworkObject InstantiateAndSpawn(NetworkObject networkPrefab, ulong owne
754754 return null ;
755755 }
756756
757- return InstantiateAndSpawnNoParameterChecks ( networkPrefab , ownerClientId , destroyWithScene , isPlayerObject , forceOverride , position , rotation ) ;
757+ return InstantiateAndSpawnNoParameterChecks ( networkPrefab , NetworkManager , ownerClientId , destroyWithScene , isPlayerObject , forceOverride , position , rotation ) ;
758758 }
759759
760760 /// <summary>
761761 /// !!! Does not perform any parameter checks prior to attempting to instantiate and spawn the NetworkObject !!!
762762 /// </summary>
763- internal NetworkObject InstantiateAndSpawnNoParameterChecks ( NetworkObject networkPrefab , ulong ownerClientId = NetworkManager . ServerClientId , bool destroyWithScene = false , bool isPlayerObject = false , bool forceOverride = false , Vector3 position = default , Quaternion rotation = default )
763+ internal NetworkObject InstantiateAndSpawnNoParameterChecks ( NetworkObject networkPrefab , NetworkManager networkManager , ulong ownerClientId = NetworkManager . ServerClientId , bool destroyWithScene = false , bool isPlayerObject = false , bool forceOverride = false , Vector3 position = default , Quaternion rotation = default )
764764 {
765765 NetworkObject networkObject ;
766766 // - Host and clients always instantiate the override if one exists.
@@ -782,6 +782,8 @@ internal NetworkObject InstantiateAndSpawnNoParameterChecks(NetworkObject networ
782782 Debug . LogError ( $ "Failed to instantiate and spawn { networkPrefab . name } !") ;
783783 return null ;
784784 }
785+
786+ networkObject . NetworkManagerOwner = networkManager ;
785787 networkObject . IsPlayerObject = isPlayerObject ;
786788 networkObject . transform . SetPositionAndRotation ( position , rotation ) ;
787789 // If spawning as a player, then invoke SpawnAsPlayerObject
0 commit comments