Search Unity

Disable Pressed Button- alternatives to enabled?

Discussion in 'Scripting' started by eco_bach, Mar 14, 2020.

  1. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
    So I am using a PointerDown Event trigger to detect a 'press' in combination with a Button component to show the visual states of a button.

    The problem is I need to disable this button after it is pressed WITHOUT affecting the visual state.

    If I simply use enabled = false the the visual state reverts to the 'off' state as defined by the Button component.

    This should be a common feature of the UI, no?
    What should I do to achieve this?