VR4Medical/ICI/Library/PackageCache/com.unity.ugui@57cef44123c7/Runtime/TMP/TMP_InputValidator.cs
2025-07-29 13:45:50 +03:00

23 lines
736 B
C#

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);
}
}