Search Issue Tracker

Active

Votes

0

Found in

6000.0.31f1

6000.1.0a8

Issue ID

UUM-91011

Regression

Yes

Bad performance when executing the Physics.IgnoreCollisions() method while in Play Mode

--

-

Reproduction steps:
1. Open the attached “repro_IN-90839“ project
2. Open “Assets/OutdoorsScene.unity“ Scene
3. Open the Profiler (“Window → Analysis → Profiler“)
4. In the Profiler window, enable the “Record profiling information“, enable “Clear on Play“ and enable “Deep Profile“
5. Enter the Play Mode
6. In the Game view, select “Ignore(false)“ and then “Ignore(true)“
7. Exit or pause the Play Mode
8. In the Profiler window, in the “Hierarchy” section, find and select the “Physics.IgnoreCollision()“ method
9. Check the performance cost of it

Expected result: “Physics.IgnoreCollision()“, on both the “Ignore(false)“ and the “Ignore(true)“ button press spikes, shows up to 50 ms in the “Time ms“ column
Actual result: “Physics.IgnoreCollision()“ on the “Ignore(false)“ button press spike shows around 170 ms in the “Time ms“ column while the “Ignore(true)“ button press spike shows around 400-600 ms

Reproducible with: 2023.3.0b7, 6000.0.31f1, 6000.1.0a8
Not reproducible with: 2021.3.47f1, 2022.3.55f1, 2023.3.0b6

Reproducible on: Windows 10 (22H2), Windows 11 (24H2) (reporter’s environment)
Not reproducible on: No other environments tested

Note: Not able to test it in the Player

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.