Search Issue Tracker
Active
Fixed in 2022.3.20f1, 2023.2.10f1, 2023.3.0b7
Votes
0
Found in
2022.3.17f1
2023.2.4f1
2023.3.0b1
Issue ID
UUM-59650
Regression
No
Collision does not turn back on when disabling the CompositeCollider2D in a script and later re-enabling it
How to reproduce:
1. Open the user’s attached “CompositeCollider2DBug.zip” project
2. Enter Play Mode
3. Wait a few seconds
4. Observe the result
Expected result: Collider of “Enabled” GameObject is working
Actual result: Collider of “Enabled” GameObject is not working
Reproducible with: 2021.3.34f1, 2022.3.17f1, 2023.2.4f1, 2023.3.0b1
Reproduced on: macOS 13.6.3 (Intel)
Not reproducible on: No other environment tested
Notes:
reproducible in the Editor and Standalone Player (macOS)
collider works if disabling and enabling the GameObject
when manually turning "isTrigger" on and then off again in the Inspector, the CompositeCollider2D works again
Collider doesn’t work if
Calling GenerateGeometry()
Setting the Generation Type to Manual
Disabling & enabling the BoxCollider2Ds instead of the CompositeCollider2D
-
MelvMay
Jan 15, 2024 12:42
There is a bug here but unfortunately not the one you reported.
If you look at the CompositeCollider2D it does not have an Enable/Disable checkbox therefore explicitly setting its enable/disabled state should do nothing. This is the bug, it is actually allowing itself to be disabled. Not allowing enabled is working however.
At some point, this override has broken so the bug fix here will:
Ensure that setting the "enabled" property has no effect
Update the docs to explicitly state that it will have no effect
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
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
Resolution Note (fix version 2023.3.0b7):
Fix for this issue is available on Unity 2023.3.0b7 and above
Resolution Note (fix version 2023.2.10f1):
Fix for this issue is available on Unity 2023.2.10f1 and above
Resolution Note (fix version 2022.3.20f1):
Fix for this issue is available on Unity 2022.3.20f1 and above.
Note that CompositeCollider2D cannot be disabled/enabled with the Behaviour.enabled property. Any changes to that property will be ignored