Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

[Solved] Problem With Toggle.IsOn

Discussion in 'UGUI & TextMesh Pro' started by CalaveraX, Jun 30, 2015.

  1. CalaveraX

    CalaveraX

    Joined:
    Jul 11, 2013
    Posts:
    143
    Hi everyone!

    I'm having some troubles, i have a categoryGroup with 3 toggles, so i can have in "ON" state only one at the same time.

    My problem is that when i click one of those toggles i should reproduce a "click" sound.

    Untill that everything is OK.

    The problem, that if i set the toggle.isOn via Script, the toggle is reproducing the click sound, and it should not be reproduced, at first i tough it was because my sound was playing on the event "OnValueChange" so, i took it off from there, and add it on an event trigger "onPointerClick", but the sound is still playing when i set the toggle to on via script.

    Any hints on this would be really appreciated.

    Thanks in advance!!!
     

    Attached Files:

  2. CalaveraX

    CalaveraX

    Joined:
    Jul 11, 2013
    Posts:
    143
    Solved, it was a call from another script, the replacement worked fine :)