ShanxiKnowledgeBase/SXElectricalInspection/Assets/Adam/Scripts/TTTTT.cs

51 lines
1.0 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using SMHFramework.Helper;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Utility;
//============================================================
//支持中文文件使用UTF-8编码
//@author YangHua
//@create 20230920
//@company Adam
//
//@description:
//============================================================
namespace Adam
{
public class TTTTT : MonoBehaviour
{
string path;
public TEst t;
public void Start()
{
path = Application.dataPath + "/StreamingAssets/" + "TT.json";
TEst t = new TEst();
t.name = "TTT";
JsonHelper.WriteJsonToFile(path, t);
}
private void Update()
{
if (Input.GetKeyDown(KeyCode.Escape))
{
t = new TEst();
string json = JsonHelper.GetJson(t);
Debug.Log(json);
}
}
}
[Serializable]
public class TEst
{
public string name;
}
}