Search Issue Tracker

Fixed in 2021.2.X

Votes

0

Found in

2019.2.0b4

2020.2

2020.2.1f1

2021.1

2021.2

Issue ID

1307257

Regression

Yes

InvalidOperationException is thrown when Toggle component is toggled in Inspector window, using "Is On" field

uGUI

-

Reproduction steps:
1. Open user's project "ToggleEditorExceptionInPlaymode.zip"
2. Open "SampleScene" Scene
3. Enter Play Mode and click on "Toggle" under "Canvas" in the Hierarchy window
4. Try toggling the Toggle in Game View while looking at the Inspector window
5. Notice how the "Is On" field in Inspector is toggled as well
6. Try toggling the "Is On" field in Inspector

Expected result: Toggle in Game View is toggled when toggling the "Is On" field in the Inspector
Actual result: "InvalidOperationException: This cannot be used during play mode." exception is thrown when toggling the "Is On" field in the Inspector

Reproducible with: (using UGUI 1.0.0) 2019.2.0b4, 2019.4.0f1, 2019.4.19f1, 2020.2.3f1, 2021.1.0b4, 2021.2.0a3
Not reproducible with: (using UGUI 1.0.0) 2018.4.31f1, 2019.2.0b3

Note: on version 2018.4.31f1 toggling the "Is On" field in the Inspector doesn't toggle the Toggle in the Game View

  1. Resolution Note (fix version 2021.2):

    Fixed in 2021.2.0a8

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.