How to add AnimationPlayer key frame for texture in code?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By CakeLover

I’m trying to add a keyframe of texture of my sprite

enter image description here
enter image description here

using script

How do I achieve this?

I don’t see how that’s similar to my question

CakeLover | 2022-01-25 10:29

I thought you were asking about adding code to AnimationPlayer

ramazan | 2022-01-25 10:32

no I’m trying to add a keyframe using code

CakeLover | 2022-01-25 10:34

Yes something like that but with texture

CakeLover | 2022-01-25 10:38