Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // -----JS CODE-----
- //Creates an input we can connect our sprite to and access using script.componentName
- // @input Component.SpriteVisual spriteVisual
- //Sets the display property of the sprite to true so we can see it
- script.spriteVisual.enabled = true;
- //loops defines how many times the animation will play, set to -1 to play continuously
- var loops = 1;
- var offset = 0;
- script.spriteVisual.getMaterial(0).getPass(0).baseTex.control.play(loops, offset);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement