Simplify string interpolation

This commit is contained in:
Paul Pacheco 2020-09-12 09:04:52 -05:00
parent 9f53382bdd
commit 992129e5b6
3 changed files with 3 additions and 3 deletions

View File

@ -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())

View File

@ -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" +

View File

@ -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);