Hello, i am trying to create a small clip in my game it will only use pictures it wouldnt use Animation or anything. How do I do this? I have been looking everyewhere but only found 3D ones and Pro ones…
If you want to animate a set of textures, you can just change the texture in the material to match a frame rate. Create a plane with a material and attach this script. Drag your frames onto artex.
public class AnimateTextures : MonoBehaviour {
public float FramesPerSecond;
public Texture[] artex;
int frame = 0;
private float SecondsPerFrame;
float timer = 0.0f;
void Start() { SecondsPerFrame = 1.0f / FramesPerSecond; }
void Update () {
if (timer >= SecondsPerFrame) {
int iT = Mathf.FloorToInt(timer / SecondsPerFrame);
timer -= SecondsPerFrame * iT;
frame = (frame + iT) % artex.Length;
renderer.material.mainTexture = artex[frame];
}
timer += Time.deltaTime;
}
}
Note some interface packages also will animate textures by using a texture atlas and animating the uvs.