/// <summary> /// Called when a scene object is spawned and we are a Listen Server. /// </summary> /// <param name="netMsg">A wrapper for a <see cref="TinyNetObjectSpawnSceneMessage"/>.</param> void OnLocalClientObjectSpawnScene(TinyNetMessageReader netMsg) { netMsg.ReadMessage(s_TinyNetObjectSpawnSceneMessage); TinyNetIdentity localObject = GetTinyNetIdentityByNetworkID(s_TinyNetObjectSpawnSceneMessage.networkID); if (localObject != null) { localObject.OnGiveLocalVisibility(); } }
/// <summary> /// Called when an object is spawned and we are a Listen Server. /// </summary> /// <param name="netMsg">A wrapper for a <see cref="TinyNetObjectSpawnMessage"/>.</param> void OnLocalClientObjectSpawn(TinyNetMessageReader netMsg) { netMsg.ReadMessage(s_TinyNetObjectSpawnMessage); TinyNetIdentity localObject = GetTinyNetIdentityByNetworkID(s_TinyNetObjectSpawnMessage.networkID); if (localObject != null) { localObject.OnStartClient(); localObject.OnGiveLocalVisibility(); } else { if (TinyNetLogLevel.logDebug) { TinyLogger.Log("TinyNetClient::OnLocalClientObjectSpawn called but object has never been spawned to client netId:" + s_TinyNetObjectSpawnMessage.networkID); } } }