This commit is contained in:
2020-07-04 14:41:25 +08:00
parent 70c346d2c1
commit a8f02e4da5
3748 changed files with 587372 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
using UnityEngine;
using System.Collections;
using UnityEditor;
[CustomEditor(typeof(HUDText))]
public class HUDTextInspector:Editor {
HUDText hud;
public override void OnInspectorGUI ()
{
serializedObject.Update ();
hud = target as HUDText;
EditorGUILayout.BeginHorizontal ();{
if (NGUIEditorTools.DrawPrefixButton ("Font", GUILayout.Width (64f))) {
ComponentSelector.Show<UIFont> (OnNGUIFont);
}
NGUIEditorTools.DrawProperty ("Font Name", serializedObject, "fontName"); // add by chenbin
}
EditorGUILayout.EndHorizontal ();
base.OnInspectorGUI ();
}
void OnNGUIFont (Object obj)
{
serializedObject.Update();
SerializedProperty sp = serializedObject.FindProperty("font");
sp.objectReferenceValue = obj;
serializedObject.ApplyModifiedProperties();
hud.fontName = obj.name;
NGUISettings.ambigiousFont = obj;
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 2327528ec4af846689b78cc1f1d5b5dd
timeCreated: 1450423026
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: