Danil Iarosh 716f55c138
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
Add player skin override and update game assets
- Добавлен компонент подмены спрайтов игрока перед началом игры.
- Обновлены сцена уровня, префабы, шейдеры, настройки импорта и данные призов.
- Зафиксирован embedded-пакет Unity MCP 9.6.8 и обновлены связанные файлы проекта.
2026-09-22 13:21:18 +03:00

34 lines
1.1 KiB
C#

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