Hello.
I updated recently my unity 2018 version to 2019. After the update I am getting some troubles with the toggles.
My scene has a gameobject which has another gameobject with the toggle component attached. On version 2018 I could SetActive true or false the parent of the toggle and nothing changed the toggle. Now (2019 version) I am getting the OnChangedValue triggered by setting active true or false the parent of the toggle.
Only the one of my multiple toggle list is triggered this way
I don’t know what’s happening. I am even getting the following:
Assertion failed on expression: ‘go.IsActive()’ UnityEngine.GameObject:Find(String)
I am having the same issue. Toggle.OnDisable() is making a chain reaction
Void UnityEngine.UI.Toggle:Set (Boolean, Boolean)+0xa5 at C:\buildslave\unity\build\Extensions\guisystem\UnityEngine.UI\UI\Core\Toggle.cs:274 C#
Void UnityEngine.UI.Toggle:set_isOn (Boolean)+0x4 at C:\buildslave\unity\build\Extensions\guisystem\UnityEngine.UI\UI\Core\Toggle.cs:237 C#
Void UnityEngine.UI.ToggleGroup:UnregisterToggle (Toggle)+0x53 at C:\buildslave\unity\build\Extensions\guisystem\UnityEngine.UI\UI\Core\ToggleGroup.cs:71 C#
Void UnityEngine.UI.Toggle:SetToggleGroup (ToggleGroup, Boolean)+0x19 at C:\buildslave\unity\build\Extensions\guisystem\UnityEngine.UI\UI\Core\Toggle.cs:176 C#
Void UnityEngine.UI.Toggle:OnDisable ()+0x4 at C:\buildslave\unity\build\Extensions\guisystem\UnityEngine.UI\UI\Core\Toggle.cs:150 C#
Which then triggers Toggle.onValueChange (not the one that has just been disabled, but the other toggles in the group). It should be fine if you unregister before the disable.
I thought I did something wrong. Whenever I leave the scene with toggle group, all the toggles’ valueOnChanged() fired one by one… Then the settings I saved all set to the last toggle in the toggle group.