Search Unity

Simulate a click on a Toggle

Discussion in 'UGUI & TextMesh Pro' started by Melang, Oct 24, 2014.

  1. Melang

    Melang

    Joined:
    Mar 30, 2014
    Posts:
    166
    I'm wondering whether it's possible to fully simulate a click on a toggle, including changing its color tint to the one defined in "pressed". So far i'm just changing "isOn" property and it works fine, just doesn't change the color.

    I've also tried OnPointerDown, OnPointerClick and OnSubmit but they all seem to just turn the toggle on/off and don't change the color.
     
  2. Democide

    Democide

    Joined:
    Jan 29, 2013
    Posts:
    315
    Yeah, same issue here. It'd be great to just simulate a click on UnityEngine.UI.Selectable in general.