Logo
UI Elements

Input Field Enhancer

A customizable input field extension

Overview

Input Field Enhancer upgrades a TextMeshPro input field with animated placeholder behavior. It supports slide, fade, and fade plus scale transitions. It also integrates with the Interactive system to synchronize visual states and supports submit events when pressing the enter key.

This page only covers the extension part. Click here to see the TMP Input Field documentation.


Properties

Settings

NameTypeDescription
animationTypePlaceholderAnimationAnimation used for placeholder (Fade, FadeScale, Slide)
slideOffsetVector2Offset applied when sliding placeholder
fadeAlphafloatOpacity of placeholder during animated state
scaleMultiplierfloatScale used when animating placeholder
animationDurationfloatDuration of animation transition
animationCurveAnimationCurveCurve for visual easing

References

NameTypeDescription
sourceTMP_InputFieldInput field controlled by enhancer
interactableObjectInteractiveOptional Interactive component for synced state transitions

Events

NameTypeDescription
onSubmitUnityEvent<string>Invoked when pressing enter while editing

Public Methods

NameParametersDescription
Focus()NoneFocuses and activates the input field, opening the keyboard or pointer caret

Code Example

InputFieldEnhancerExample.cs
using UnityEngine;
using Evo.UI;

public class InputFieldEnhancerExample : MonoBehaviour
{
    public InputFieldEnhancer enhancer;

    void Start()
    {
        // Submit event
        enhancer.onSubmit.AddListener(text =>
        {
            Debug.Log("Submitted: " + text);
        });

        // Manual focus
        enhancer.Focus();
    }
}

On this page