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
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
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Dragon Crashers] Build fails in U6
- [Dragon Crashers] 4 Shader error messages on import
- [Dragon Crashers] Readme text is white on light grey
- Cursor stays in front of the first character when entering text in the TextMeshPro field
- Searching in Hierarchy causes unwanted component calls
Resolution Note (fix version 2021.2):
Fixed in 2021.2.0a8