예제 #1
0
        public static T LoadJSONConfig <T>(string jsonPath) where T : class
        {
            T local2;

            try
            {
                T      local;
                string content = Miscs.LoadTextFileToString(jsonPath);
                object serializationHelperLock = ConfigUtil.serializationHelperLock;
                lock (serializationHelperLock)
                {
                    local = SerializationHelpers.DeserializeFromContent <T, FullSerializerSerializer>(content);
                }
                local2 = local;
            }
            catch
            {
                Debug.LogError("Error during loading json config: " + jsonPath);
                throw;
            }
            return(local2);
        }