Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Feedback (IN-67540) SplineAnimate performance issue, 200ms for 20 SplineAnimate objects

Discussion in 'Unity 6 Beta' started by Peter77, Jan 31, 2024.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,640
    Attaching a SplineAnimate Component to a SplineContainer where one of the parent Transforms has a scaling applied, causes a severe performance issue.

    On an AMD Ryzen 3900X setup, attaching 20 SplineAnimate Components, costs 200ms and allocates 36KB garbage per frame in the Editor. In a Player it's about 100ms.

     
    laurentlavigne and mariandev like this.
  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,640
    mariandev and tsukimi like this.
  3. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,452
    I thought they put in place anti-regression tests. What else went through the cracks...
     
  4. fnnbrr

    fnnbrr

    Joined:
    Jan 26, 2021
    Posts:
    11
    As a temp fix, make sure the Transform attached to the GameObject with your SplineContainer has a scale of (1, 1, 1). Certain methods (like SplineContainer.EvaluateUpVector()) run much slower logic if the scale is anything else. :)
     
    laurentlavigne likes this.
  5. luvcraft

    luvcraft

    Joined:
    Aug 22, 2011
    Posts:
    79
    OMG, really??? That's not gonna work in my case. Time to roll my own spline controller, I guess. :(
     
  6. luvcraft

    luvcraft

    Joined:
    Aug 22, 2011
    Posts:
    79
    Did this work correctly in a previous version? Maybe I can just roll back to that.