WXMC/.svn/pristine/1a/1ab2b210da39eb8889b67b14f92f41a2471230a2.svn-base
2024-12-04 16:18:46 +08:00

27 lines
728 B
Plaintext

using UnityEngine;
using UnityEngine.UI;
using TMPro;
namespace UI.Dates
{
/// <summary>
/// This component will call 'ApplyDefaultTextMeshProProperties' on the TextMesh Pro instance it is attached to
/// when the instance becomes active, and then it will remove itself (so this is a once-off process)
/// </summary>
[ExecuteInEditMode]
public class DatePicker_TextMeshProDefaults : MonoBehaviour
{
public void OnEnable()
{
var tmp = GetComponent<TextMeshProUGUI>();
if (tmp != null)
{
DatePicker_TextMeshProUtilities.ApplyDefaultTextMeshProProperties(tmp);
}
DestroyImmediate(this);
}
}
}