12345678910111213141516171819202122232425262728293031323334 |
- using Newtonsoft.Json;
- using QFramework;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class JsonToDataManager : MonoSingleton<JsonToDataManager>
- {
- public SceneValue JsonToSceneValue(string message)
- {
- SceneValue sceneValue = JsonConvert.DeserializeObject<SceneValue>(message);
- return sceneValue;
- }
- public List<CompositeMaterialValue> JsonToListCMV(string message)
- {
- List<CompositeMaterialValue> listCMV = JsonConvert.DeserializeObject<List<CompositeMaterialValue>>(message);
- return listCMV;
- }
- public string SceneValueToJson(SceneValue scene)
- {
- string str = JsonConvert.SerializeObject(scene);
- return str;
- }
- public string ListCMVToJson(List<CompositeMaterialValue> listCMV)
- {
- string str = JsonConvert.SerializeObject(listCMV);
- return str;
- }
- }
|