Aimbot-PPO/Aimbot-PPO-MultiScene/Assets/XCharts/Editor/ChildComponents/TextStyleDrawer.cs
Koha9 2d404cfdf2 Aimbot Enviroment very first
Basic environment include Multi scene, Reward Change, Visible chart, etc....
2022-09-05 20:46:08 +09:00

43 lines
1.3 KiB
C#

using UnityEditor;
using UnityEngine;
#if dUI_TextMeshPro
using TMPro;
#endif
using XCharts.Runtime;
namespace XCharts.Editor
{
[CustomPropertyDrawer(typeof(TextStyle), true)]
public class TextStyleDrawer : BasePropertyDrawer
{
public override string ClassName { get { return "TextStyle"; } }
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
{
base.OnGUI(pos, prop, label);
if (MakeComponentFoldout(prop, "m_Show", true))
{
++EditorGUI.indentLevel;
#if dUI_TextMeshPro
PropertyField(prop, "m_TMPFont");
#else
PropertyField(prop, "m_Font");
#endif
PropertyField(prop, "m_Rotate");
PropertyField(prop, "m_AutoColor");
PropertyField(prop, "m_Color");
PropertyField(prop, "m_FontSize");
PropertyField(prop, "m_LineSpacing");
#if dUI_TextMeshPro
PropertyField(prop, "m_TMPFontStyle");
PropertyField(prop, "m_TMPAlignment");
#else
PropertyField(prop, "m_FontStyle");
PropertyField(prop, "m_Alignment");
PropertyField(prop, "m_AutoAlign");
PropertyField(prop, "m_AutoWrap");
#endif
--EditorGUI.indentLevel;
}
}
}
}