Search Issue Tracker
Won't Fix
Won't Fix in 2023.1.X
Votes
0
Found in
2020.3.40f1
2021.3.10f1
2022.1.16f1
2022.2.0b7
2023.1.0a10
Issue ID
UUM-13914
Regression
No
UnityException is thrown when the affected code has no "isPlaying" method
How to reproduce:
1. Open the attached “IN-13813” project
2. Open the “Home” Scene
Expected result: No errors are thrown
Actual result: “UnityException: get_isPlaying is not allowed to be called from a MonoBehaviour constructor” is thrown
Reproducible with: 2020.3.40f1, 2021.3.10f1, 2022.1.16f1, 2022.2.0b7, 2023.1.0a10
Reproduced on: macOS Monterey 12.0.1
Note:
- If after step 2 no error is thrown, enter Play Mode
- User reported that this was a regression somewhere in the 2021.2 stream, but after testing it was reproducible
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
- Unity Cloud icon does not appear next to project and does not connect correctly when the project is created with Cloud but closed right after creation
- ScrollerSlider in the Scroller Control is still using UXMLTraits
- Crash on ExtractHandles when shutting down the Editor in a specific scene while Burst jobs are in progress
- Unity Hub closes with no "Project is currently open" window when selecting an already open project from the Projects list
- The Hub freezes indefinitely when copy/pasting a lot of characters in the “Set project display name” Hub window since it has no character limit
Resolution Note:
Issue with user code. The `GameStats.cs` has a static field initializer that gets an instance from the `Singleton<GameStats>.Instance` that calles `isPlaying`.
Simple workaround is to call `Singleton<GameStats>.Instance` directly or make it into a property like `public static GameStats Instance => Singleton<GameStats>.Instance;`
Resolution Note (2023.1.X):
Issue with user code. The `GameStats.cs` has a static field initializer that gets an instance from the `Singleton<GameStats>.Instance` that calles `isPlaying`.
Simple workaround is to call `Singleton<GameStats>.Instance` directly or make it into a property like `public static GameStats Instance => Singleton<GameStats>.Instance;`