Search Unity

Changing BoxCollider2D's size in-game - Performance issue in Unity 2018

Discussion in 'Physics' started by Doghelmer, Jul 22, 2018.

  1. Doghelmer

    Doghelmer

    Joined:
    Aug 30, 2014
    Posts:
    120
    I recently updated to Unity 2018.2.0f2. My game generates levels procedurally, and I noticed that this process was taking significantly longer than it did in my previous build, which was using Unity 2017.2.1p4.

    I narrowed down the issue to a line in my code where a BoxCollider2D's size was being changed. This line is run a very large number of times in rapid succession, but in Unity 2017 this did not cause any sort of performance issue.

    Is there any sort of new setting in Unity 2018 that I might have missed that could be causing this? Any other ideas? Or is it maybe time to write a bug report?
     
  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,619
    Yes, please submit a bug-report following the steps in this document:
    https://unity3d.com/unity/qa/bug-reporting

    I also found some Physics related performance issues in 2018.2. If we don't submit bug-reports for those things, Unity probably isn't going to fix them.
     
  3. Doghelmer

    Doghelmer

    Joined:
    Aug 30, 2014
    Posts:
    120
    Just read your post, and those results that you posted are in line with what I've seen as well (around 15% slower in my case). I wrote up a bug report for my specific issue, hopefully these things get taken care of in the near future.
     
    Peter77 likes this.
  4. Cryofrog

    Cryofrog

    Joined:
    Feb 1, 2017
    Posts:
    3
    I do frequent resizes of BoxCollider2D as well. Is this listed on Issue Tracker anywhere so I can wait until it's fixed before upgrading Unity? I couldn't find anything.