Playing GIF for once doesn't work
Hello, I attached a gif to my face using Legacy Face Sprite and I want my animation to play just for once, not in loop. I turned off Always Play button and applied the instructions using a scipt but it just doesn't work, since I turned off the Always Play, my gif never plays. Can you help me please?
These are the scripts that I've tried:
// -----JS CODE-----
// Plays an animated sprite
//@input Component.SpriteVisual spriteVisual
var loops = 1;
var offset = 0.0;var provider = script.spriteVisual.mainPass.baseTex.control;
// -----JS CODE----- var gifAnimation = script.getSceneObject().getFirstComponent("Component.SpriteVisual"); var loops = 1; var offset = 0.0; gifAnimation.getMaterial(0).getPass(0).baseTex.control.play(loops, offset);
Press Ctrl + S to save the script in the script editor
Press Ctrl + S to save the script in the script editor i hope it helps if you are still confused then please check my online gold loan detail to check my step by step guidelines.