#Animation Code

1 messages · Page 1 of 1 (latest)

lime trout
#

why are you doing
GetComponent<Renderer>
if there is no normal renderer?

#

and if you are using a sprite renderer you want to have a array of sprites not textures

#

@proven swan

#

then you can use
.sprite = mynewsprite;

clever blaze
#

how can I pause an animation, I feel like there is literally no solution to this problem?

lime trout
clever blaze
#

well, it fits; anyways sorry

proven swan
lime trout
#

SpriteRenderer is the correct thing

proven swan
lime trout
#

if you want to use a sprite renderer you have to import the images as sprites

proven swan
#

As you can see on the right pane I'm using Sprite Renderer

#

And in the Mover script I'm selecting each frame for the animation, so in the code I'm using Texture2D[] variable, how can I then make it work with GetComponent<SpriteRenderer>() ?

lime trout
#

Texture2D[] is if you use a normal render with a material
if you use a sprite renderer you have to use a
Sprite[]
and import the image you want to use as a sprite

proven swan