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.

Question Can't ALT-CLICK a Button

Discussion in 'UI Toolkit' started by FuguFirecracker, Aug 21, 2022.

  1. FuguFirecracker


    Sep 20, 2011
    Title pretty much sez it all, but to make a short story longer ...

    Okay -can't do that- I'll make my own control.
    Hmmm... Pseudostate.Active doesn't work unless I implement Clickable.
    Upon Implementing Clickable, can't Alt-Click.


    Any particular reason why one is prevented from Alt-Clicking a button?
  2. oscarAbraham


    Jan 7, 2013
    You can do it by adding a ManipulatorActivationFilter to the clickable. That doc page has an example that should work for you; just set the alt modifier in the filter.
    FuguFirecracker likes this.
  3. FuguFirecracker


    Sep 20, 2011
    Thank you for taking the time to let me know about this. :)

    I'll keep this in the back of my mind for later.

    Although the ManipulatorActivationFilter does permit my button to react to whatever input permutations I instruct, there does not appear to be a convenient way to either
    A) Attach more than one MethodHandler to a Clickable
    or B
    ) Attach more than one Clickable to a Button

    Plainly stated, even though my Button will now react to an Alt-Click ... it won't react any differently.

    The only way I can see this of being of any use is by swapping out the buttons || clickables when I send a AltDown Event ..

    But I'm pretty happy with the robust custom control I've already written ;)

    Thanks, again :D
    Last edited: Aug 23, 2022