Search Unity

Doubt about how animations load resources

Discussion in 'Animation' started by bzkarcade, Nov 11, 2020.

  1. bzkarcade

    bzkarcade

    Joined:
    Oct 5, 2017
    Posts:
    21
    I have to show some animations that I already have made in spritesheets and I only want to show the sequences of images, but there are many and I only have to load one per scene in my game.

    If I have a gameObject with a spriteRender (or image on ui) and I create a clip for each spritesheet (anim1.anim, anim2.anim, ...) when the scene is loaded, will this object load all the images in memory?

    Supposing that I had 30 images that were my spritesheets and had an initial state where there was no image showing in the spriteRenderer and then by programming it would change the state to put the anim11, would only the image that represents this be loaded?

    Because if all the images are loaded even if they are not visible. It would recommend me to make a gameObject for each animation and make the corresponding load in my scene.

    Thank you very much for your help