Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles

Error on DoodleAnimator.ChangeAnimation()

A topic by Alex Duncan created 45 days ago Views: 37 Replies: 1
Viewing posts 1 to 2

Hi, I'm trying to call DoodleAnimator.ChangeAnimation() and have hit a very serious error that will crash Unity unless I restart the program. My code is pretty simple.

if(playerHits >= minPlayerHits){
    if(!activating){
        Debug.Log("Activating");
        activating = true;
        anim.ChangeAnimation(activatingAnim);
    }
    getPowerUpTimer += Time.deltaTime;
    if(getPowerUpTimer > getPowerUpTime){
         getPowerUpTimer = 0f;
         playerHits = 0;
         Debug.Log("HEYO WE GOT DAT POWERUP");
         PlayerGetsPowerUp();
    }
} else if(activating){
    activating = false;
    Debug.Log("Deactivating");
    anim.ChangeAnimation(baseAnim);
}

The error I get when I call ChangeAnimation is the following:

Assertion failed: TLS Allocator ALLOC_TEMP_THREAD, underlying allocator ALLOC_TEMP_THREAD has unfreed allocations, size 12

The size of the unfreed allocation increments by 12 each frame after this, it seems. I have tried a few other ways to change the animation, but all of them give me the same results.

Hey! 
I tried your script on Unity 2018 and couldn't reproduce your error. Can you let me know what platform and unity version you're running on?  And if you happen to have a simple project that produces your error I can look at, even better. Thanks!!