Search Issue Tracker


Fixed in 2022.3.20f1, 2023.2.10f1, 2023.3.0b7



Found in




Issue ID




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 “” 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

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

  1. Resolution Note (fix version 2023.3.0b7):

    Fix for this issue is available on Unity 2023.3.0b7 and above

  2. Resolution Note (fix version 2023.2.10f1):

    Fix for this issue is available on Unity 2023.2.10f1 and above

  3. 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

Comments (1)

  1. 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

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.