using System; using System.Collections.Generic; using UnityEngine; namespace HeurekaGames { public class Heureka_Serializer { public static string Serialize(List items) { return JsonUtility.ToJson(new StringList(items)); } public static List DeserializeStringList(string json) { StringList list = JsonUtility.FromJson(json); return (list != null) ? list.Items : new List(); } public static Type DeSerializeType(string serializedType) { return Type.GetType(serializedType); } public static string SerializeType(Type type) { return type.AssemblyQualifiedName; } [SerializeField] public class StringList { public List Items = new List(); public StringList(List items) { this.Items = items; } } } }