using ExitGames.Client.Photon; using ExitGames.Client.Photon.StructWrapping; using System.Collections.Generic; using UnityEngine; namespace PhotonLogger.Core; public class OperationNormalizer { public static Dictionary NormalizeDictionaryValues(Dictionary inDict) { var dictionary = new Dictionary(inDict); foreach (KeyValuePair entry in inDict) { var key = entry.Key; var value = entry.Value; if (value.GetType() == typeof(Vector2)) dictionary[key] = "StubVector2"; else if (value.GetType() == typeof(Vector3)) dictionary[key] = "StubVector3"; else if (value is Dictionary) dictionary[key] = NormalizeDictionaryValues((Dictionary)value); else if (value is ParameterDictionary) dictionary[key] = NormalizeDictionaryValues(new Dictionary((ParameterDictionary)value)); else if (value is StructWrapper) dictionary[key] = "a byte that must be unwrapped"; else if (value is StructWrapper) dictionary[key] = "a bool that must be unwrapped"; } return dictionary; } }