21 lines
434 B
C#
21 lines
434 B
C#
|
|
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
[CustomEditor(typeof(DeviceManager))]
|
|
public class DeviceRecordData : Editor
|
|
{
|
|
|
|
|
|
public override void OnInspectorGUI()
|
|
{
|
|
DrawDefaultInspector();
|
|
|
|
DeviceManager _devicemanager = GameObject.FindObjectOfType<DeviceManager>();
|
|
if (GUILayout.Button("保存并覆盖数据"))
|
|
{
|
|
DeviceManager.RecordDataToJson(_devicemanager.gameObject);
|
|
}
|
|
}
|
|
}
|