Files
GameDevTVObstacleDodge/Library/PackageCache/com.unity.ugui@f250afc9b68d/Runtime/TMP/TMP_InputValidator.cs

23 lines
736 B
C#
Raw Normal View History

2026-01-08 16:50:20 +00:00
using UnityEngine;
using System.Collections;
namespace TMPro
{
/// <summary>
/// Custom text input validator where user can implement their own custom character validation.
/// </summary>
[System.Serializable]
public abstract class TMP_InputValidator : ScriptableObject
{
/// <summary>
/// Customs text input validation function.
/// </summary>
/// <param name="text">The original text</param>
/// <param name="pos">The position in the string to add the caharcter</param>
/// <param name="ch">The character to add</param>
/// <returns>The character added</returns>
public abstract char Validate(ref string text, ref int pos, char ch);
}
}