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
- Crash on PrepareDrawShadowsCommandStep1 when entering the Play Mode in a specific project
- Physics Layer Collision Matrix's Layer names, checkboxes and hover highlights become misaligned when the Editor's UI Scaling gets changed
- Light/shadow information on an edge of a Terrain tile creates a seam with an adjacent Terrain tile when baking a LightMap
- "Missing types referenced from component UniversalRenderPipelineGlobalSettings on game object UniversalRenderPipelineGlobalSettings..." warning is thrown after switching the Platform to tvOS
- “Metal: Error creating pipeline state (Universal Render Pipeline/2D/Sprite-Lit-Default): Vertex attribute BLENDINDICES0(5) of type uint4 cannot be read using MTLAttributeFormatFloat2 (null)“ when setting GPU Skinning to GPU after opening the project
Resolution Note (fix version 2021.2):
Fixed in 2021.2.0a8