Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

TextMesh Pro Disable Cut/Copy/Paste for TMP_InputField

Discussion in 'UGUI & TextMesh Pro' started by mgilbertzspace, Sep 1, 2021.

  1. mgilbertzspace

    mgilbertzspace

    Joined:
    Feb 22, 2018
    Posts:
    1
    I need to be able to disable an input field from responding to cut/copy/paste, as I need to be able to process the pasted string prior to inserting it into the field. I tried using onValidateInput(), but the validation seems to occur after a paste, so I never see something like CTRL-V to reject, I only see the actual characters that are pasted in. Is there a 'correct' way to prevent the user from pasting/cutting, or to intercept and replace the value being pasted?
     
  2. kacperochnik01

    kacperochnik01

    Joined:
    Mar 30, 2020
    Posts:
    1