using System.Collections.Generic; using Newtonsoft.Json; using MCPForUnity.Runtime.Serialization; namespace MCPForUnity.Editor.Helpers { /// /// Shared JsonSerializer with Unity type converters. /// Extracted from ManageGameObject to eliminate cross-tool dependencies. /// public static class UnityJsonSerializer { /// /// Shared JsonSerializer instance with converters for Unity types. /// Use this for all JToken-to-Unity-type conversions. /// public static readonly JsonSerializer Instance = JsonSerializer.Create(new JsonSerializerSettings { Converters = new List { new Vector2Converter(), new Vector3Converter(), new Vector4Converter(), new QuaternionConverter(), new ColorConverter(), new RectConverter(), new BoundsConverter(), new UnityEngineObjectConverter() } }); } }