自定义字体

This commit is contained in:
tianmo committed 2026-10-20 18:59:18 +08:00
1 parent 1aeaebcddb
commit b26a10ceb9
20 files changed
+2861 -88

No files matched your search

@@ -0,0 +1,30 @@
using UnityEditor;
using UnityEngine;
[CustomEditor(typeof(digits_sheet_auto))]
public class digits_sheet_autoEditor : Editor
{
public override void OnInspectorGUI()
{
serializedObject.Update();
SerializedProperty prop = serializedObject.GetIterator();
bool enterChildren = true;
while (prop.NextVisible(enterChildren))
{
enterChildren = false;
if (prop.name == "m_Script")
continue;
if (prop.name == "showComma")
EditorGUILayout.PropertyField(prop, new GUIContent("显示逗号‘,’"));
else if (prop.name == "decimalPlaces")
EditorGUILayout.PropertyField(prop, new GUIContent("保留小数点位数"));
else
EditorGUILayout.PropertyField(prop, true);
}
serializedObject.ApplyModifiedProperties();
}
}