mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Simplify string interpolation
This commit is contained in:
parent
9f53382bdd
commit
992129e5b6
@ -864,7 +864,7 @@ static NetworkIdentity SpawnSceneObject(SpawnMessage msg)
|
||||
NetworkIdentity identity = GetAndRemoveSceneObject(msg.sceneId);
|
||||
if (identity == null)
|
||||
{
|
||||
logger.LogError($"Spawn scene object not found for {msg.sceneId.ToString("X")} SpawnableObjects.Count={spawnableObjects.Count}");
|
||||
logger.LogError($"Spawn scene object not found for {msg.sceneId:X} SpawnableObjects.Count={spawnableObjects.Count}");
|
||||
|
||||
// dump the whole spawnable objects dict for easier debugging
|
||||
if (logger.LogEnabled())
|
||||
|
@ -1168,7 +1168,7 @@ void OnDeserializeSafely(NetworkBehaviour comp, NetworkReader reader, bool initi
|
||||
catch (Exception e)
|
||||
{
|
||||
// show a detailed error and let the user know what went wrong
|
||||
logger.LogError($"OnDeserialize failed for: object={name} component={comp.GetType()} sceneId={sceneId.ToString("X")} length={contentSize}. Possible Reasons:\n" +
|
||||
logger.LogError($"OnDeserialize failed for: object={name} component={comp.GetType()} sceneId={sceneId:X} length={contentSize}. Possible Reasons:\n" +
|
||||
$" * Do {comp.GetType()}'s OnSerialize and OnDeserialize calls write the same amount of data({contentSize} bytes)? \n" +
|
||||
$" * Was there an exception in {comp.GetType()}'s OnSerialize/OnDeserialize code?\n" +
|
||||
$" * Are the server and client the exact same project?\n" +
|
||||
|
@ -329,7 +329,7 @@ public void FindOrSpawnObject_ErrorWhenSceneIdIsNotInSpawnableObjectsDictionary(
|
||||
sceneId = sceneId,
|
||||
};
|
||||
|
||||
LogAssert.Expect(LogType.Error, $"Spawn scene object not found for {msg.sceneId.ToString("X")} SpawnableObjects.Count={spawnableObjects.Count}");
|
||||
LogAssert.Expect(LogType.Error, $"Spawn scene object not found for {msg.sceneId:X} SpawnableObjects.Count={spawnableObjects.Count}");
|
||||
LogAssert.Expect(LogType.Error, $"Could not spawn assetId={msg.assetId} scene={msg.sceneId} netId={msg.netId}");
|
||||
bool success = ClientScene.FindOrSpawnObject(msg, out NetworkIdentity networkIdentity);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user