Search Issue Tracker
By Design
Votes
0
Found in
2022.3.61f1
6000.0.51f1
6000.1.7f1
6000.2.0b4
Issue ID
UUM-108959
Regression
No
Behaviour.isActiveAndEnabled desyncs when checked from a sibling component during OnEnable/OnDisable
Reproduction steps:
1. Open the attached “BugRepro” project
2. Open the “Assets/Repro.unity“ Scene
3. Enter the Play Mode
4. Observe the Console window
Expected result:
When the GameObject is enabled:
“Secondary OnEnable: enabled=True activeInHierarchy=True isActiveAndEnabled=True (Should be True)” should be displayed
When the GameObject is disabled:
”Secondary OnDisable: enabled=True activeInHierarchy=False isActiveAndEnabled=False (Should be False)” should be displayed
Actual result:
When the GameObject is enabled:
“Secondary OnEnable: enabled=True activeInHierarchy=True isActiveAndEnabled=False (Should be True)” is displayed
When the GameObject is disabled:
”Secondary OnDisable: enabled=True activeInHierarchy=False isActiveAndEnabled=True (Should be False)” is displayed
Reproducible with: 2022.3.61f1, 6000.0.51f1, 6000.1.7f1, 6000.2.0b4
Reproducible on: Windows 11
Not reproducible on: No other environment tested
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
- Shader Graph Node information is briefly displayed in Graph Inspector when clicking on Category in the Blackboard
- Module installation fails with "Download failed: Validation Failed" errors when using beta.2 Hub version
- JsonConvert conversion fails trying to call GetCallbackMethodsForType when [OnDeserialized] is used in a class
- Shader Graph Category dropdown cannot be expanded/collapsed when clicking on the text
- Different text alignment in the column header in Entities "System" window
Resolution Note:
The check is functioning as designed. The unwanted value is returned due to Intermediate script executing before Primary or Secondary object executes OnEnable.
This is documented in our Scripting API:
https://docs.unity3d.com/6000.3/Documentation/ScriptReference/Behaviour-isActiveAndEnabled.html
In order to solve this push back Intermediate script execution in Script Execution Order menu in Project settings.