예제 #1
0
        /// <summary>
        /// Call this when definition data is in need of being accessed via the Json Data's extended properties.
        /// </summary>
        public static void CacheUidData(LdtkJson project)
        {
            Database = new Dictionary <long, ILDtkUid>();

            Definitions defs = project.Defs;

            CacheLayerDefs(defs.Layers);
            CacheEntityDefs(defs.Entities);

            CacheUidData(defs.Tilesets);
            CacheUidData(defs.Enums);
            CacheUidData(defs.ExternalEnums);

            CacheUidData(project.Levels);
            CacheUidData(defs.LevelFields);
        }
예제 #2
0
 public static string ToJson(this LdtkJson self) => JsonConvert.SerializeObject(self, LDtkUnity.Converter.Settings);