30 lines
606 B
C#
30 lines
606 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using UnityEditor;
|
|
using UnityEngine;
|
|
using XRLib;
|
|
using Studio;
|
|
|
|
[CustomAsset(".ini")]
|
|
|
|
public class INIEditor : Editor
|
|
{
|
|
public string data;
|
|
public string assetPath;
|
|
static int prevHash;
|
|
public override void OnInspectorGUI()
|
|
{
|
|
data = EditorGUILayout.TextArea(data);
|
|
int hash = data.GetHashCode();
|
|
if (hash != prevHash)
|
|
{
|
|
File.WriteAllText(assetPath, data);
|
|
prevHash = hash;
|
|
}
|
|
}
|
|
}
|