Transitioning Background

Hi everyone,

I am new to unity and am learning to code in C#.

Currently the 2D application i am developing in unity requires a static background that changes periodically for the game so I used:

GameObject BG = new GameObject(“BGI”);
BG.AddComponent();
BG.guiTexture.texture = Resources.Load (counter.ToString()) as Texture;
BG.transform.position = new Vector3((float)0.5,(float)0.5);
BG.layer = 8;

following the answer from How can I display a flat background - 2D image, not a skybox - behind everything in my camera? - Questions & Answers - Unity Discussions

So i was wondering if its possible to created an animated transition between these object images? If so could someone enlighten me on how to do this? :smile:

EDIT: I realised this may be in the wrong forum. If so, how do i move the thread to like, scripting or something?

well if is a 2d game you could use sprite for the backgrounds

then if need a transition between them you can use a simple script that take the active one and the next one and change it to 0 a 1 respectively.

i don’t know if this help you.