Search Unity

Animation Freezes while switching in between scenes

Discussion in 'Editor & General Support' started by AshwinTheGammer, Jul 29, 2021.

  1. AshwinTheGammer

    AshwinTheGammer

    Joined:
    Sep 23, 2016
    Posts:
    69
    The problem, is my weapon's draw animations freezes when I come back from Menu Scene to Main scene. However, it doesn't freeze when I play for first time.
    Due to animation freeze game becomes unplayable.
    I don't know how to debug this problem.
    Video link
     
  2. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,115
    this appears like some of the game logic is not re-initialized properly once you pause and then get back into game.

    on a piece of paper you need to break your game logic to understand better the situation.

    example.

    loading player,

    adding weapon,

    initialize ammo.

    ecc.

    then what happens when you got to pause?

    and when you get back?

    do you add something twice? did you forgot to clean some variable value?

    the player animation thinks is still in pause?

    I also see a bunch of errors there. try finding out why you get null references, meaning something doesn't have the value expected.
     
    AshwinTheGammer likes this.