Search Unity

CPU usage PreLateUpdate.DirectorUpdateAnimationBegin PreLateUpdate.DirectorUpdateAnimationEnd

Discussion in 'Animation' started by ben-maurin, Oct 27, 2017.

  1. ben-maurin

    ben-maurin

    Joined:
    Apr 7, 2016
    Posts:
    47
    Hi,

    I have a CPU issue using Animator. I only use it for small or UI objects, with no sprite modification, no root motion (it still appears in profiler). Generally it's only for changing the state of an objet (the animators are always stuck in on state exept on particular event that will trigger an animation that will enable some components or change the alpha of some sprites).

    Here I have an exemple with 7 very simple animators. It cost 0.17ms (DirectorUpdateAnimationBegin )+ 0.15ms (DirectorUpdateAnimationEnd) on PC, and it's 3 times that values on consoles ( 1.5 ms in total !) .

    upload_2017-10-27_10-25-17.png

    The kind of animations they are stuck in :
    upload_2017-10-27_10-40-9.png

    The only way I found is to remove ALL animator. If there is at least one animator this appear and cost a lot.

    Do you have any tips to reduce this cost?

    Thanks
     
  2. FMark92

    FMark92

    Joined:
    May 18, 2017
    Posts:
    1,243
  3. ben-maurin

    ben-maurin

    Joined:
    Apr 7, 2016
    Posts:
    47
    It does not seem really related. The cpu problem come from Animator, not Particle system.
     
  4. FMark92

    FMark92

    Joined:
    May 18, 2017
    Posts:
    1,243
    You're still waiting for job group. I thought it might be.
    Anyway I get 0.06ms on 18 complex animators. So it's not really the kind of slowdown I care about. I can get further optimise my update calls to make the whole thing faster anytime.
     
  5. ben-maurin

    ben-maurin

    Joined:
    Apr 7, 2016
    Posts:
    47
    you get this values with unity 5.3?
     
  6. FMark92

    FMark92

    Joined:
    May 18, 2017
    Posts:
    1,243
    No, I use 2017.1.
     
  7. ben-maurin

    ben-maurin

    Joined:
    Apr 7, 2016
    Posts:
    47
    So I checked with 2017.3, still the same problem.
     
  8. johannesahvenniemi

    johannesahvenniemi

    Joined:
    Feb 17, 2015
    Posts:
    2
    Experiencing the same issue. Only a few animators but DirectorUpdateAnimationBegin and DirectorUpdateAnimationEnd consumes lots of CPU. Using version 2017.2.1.p2. Any news on this?
     
  9. Tortuap

    Tortuap

    Joined:
    Dec 4, 2013
    Posts:
    137
    Same here... 2017.2.1f1
     
  10. yanivng

    yanivng

    Joined:
    May 21, 2017
    Posts:
    43
    Same here, 2018.2.20f1
     
  11. hassanali4

    hassanali4

    Joined:
    Jul 14, 2017
    Posts:
    3
    2019.1.8f1 same issue
     
  12. LeekAndRibs

    LeekAndRibs

    Joined:
    Mar 7, 2017
    Posts:
    49
    2020.2.3f1 same issue
     
  13. rucesocial

    rucesocial

    Joined:
    Mar 13, 2020
    Posts:
    9