mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
fix: Don't set asset id for scene objects
Fixes this warning: ``` SetDynamicAssetId object already has an assetId <68fb15ce5f2e7eb44a8ac123d853b91a> UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object) UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[]) UnityEngine.Logger:Log(LogType, Object) UnityEngine.Debug:LogError(Object) Mirror.NetworkIdentity:set_assetId(Guid) (at D:\Unity\Projects\TestUmmorpg\Assets\uMMORPG\Plugins\Mirror\Runtime\NetworkIdentity.cs:165) Mirror.ClientScene:ApplySpawnPayload(NetworkIdentity, SpawnMessage) (at D:\Unity\Projects\TestUmmorpg\Assets\uMMORPG\Plugins\Mirror\Runtime\ClientScene.cs:470) Mirror.ClientScene:OnSpawn(SpawnMessage) (at D:\Unity\Projects\TestUmmorpg\Assets\uMMORPG\Plugins\Mirror\Runtime\ClientScene.cs:529) Mirror.<>c__DisplayClass35_0`1:<RegisterHandler>b__0(NetworkConnection, SpawnMessage) (at D:\Unity\Projects\TestUmmorpg\Assets\uMMORPG\Plugins\Mirror\Runtime\NetworkClient.cs:400) Mirror.<>c__DisplayClass7_0`1:<MessageHandler>b__0(NetworkMessage) (at D:\Unity\Projects\TestUmmorpg\Assets\uMMORPG\Plugins\Mirror\Runtime\MessagePacker.cs:163) Mirror.NetworkConnection:InvokeHandler(Int32, NetworkReader, Int32) (at D:\Unity\Projects\TestUmmorpg\Assets\uMMORPG\Plugins\Mirror\Runtime\NetworkConnection.cs:271) Mirror.NetworkConnection:TransportReceive(ArraySegment`1, Int32) (at D:\Unity\Projects\TestUmmorpg\Assets\uMMORPG\Plugins\Mirror\Runtime\NetworkConnection.cs:325) Mirror.NetworkClient:OnDataReceived(ArraySegment`1, Int32) (at D:\Unity\Projects\TestUmmorpg\Assets\uMMORPG\Plugins\Mirror\Runtime\NetworkClient.cs:149) UnityEngine.Events.InvokableCall`2:Invoke(ArraySegment`1, Int32) UnityEngine.Events.UnityEvent`2:Invoke(ArraySegment`1, Int32) Mirror.TelepathyTransport:ProcessClientMessage() (at D:\Unity\Projects\TestUmmorpg\Assets\uMMORPG\Plugins\Mirror\Runtime\Transport\TelepathyTransport.cs:79) Mirror.TelepathyTransport:LateUpdate() (at D:\Unity\Projects\TestUmmorpg\Assets\uMMORPG\Plugins\Mirror\Runtime\Transport\TelepathyTransport.cs:106) ```
This commit is contained in:
parent
00b51364ac
commit
7e4023246b
@ -467,7 +467,9 @@ public static GameObject FindLocalObject(uint netId)
|
|||||||
static void ApplySpawnPayload(NetworkIdentity identity, SpawnMessage msg)
|
static void ApplySpawnPayload(NetworkIdentity identity, SpawnMessage msg)
|
||||||
{
|
{
|
||||||
identity.Reset();
|
identity.Reset();
|
||||||
identity.assetId = msg.assetId;
|
|
||||||
|
if (msg.assetId != Guid.Empty)
|
||||||
|
identity.assetId = msg.assetId;
|
||||||
|
|
||||||
if (!identity.gameObject.activeSelf)
|
if (!identity.gameObject.activeSelf)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user