Hi there,
I have loaded an image sequence as a sprite in my scene and I would like to link the X-translation of my camera to the playback of the sequence. For example if my camera is at unity 1 in the X-translation I want the sprite to show image 1 from the sequence and so forth.
Any help is very much appreciated!
Many thanks,
Klaas
i think you mean scene when you’re saying unity (as in unity 1 is scene 1)
The easier way i can think of to do this is with a UI Canvas
, First have a GameObject
somewhere in a scene that doesn’t get destroyed OR mark your GameObject
as DontDestroyOnLoad.
Then, create a MonoBehaviour
class (let’s call it TransitionManagerBehaviour
) that takes care of showing the transition whenever you get into your new scene.
In the TransitionManagerBehaviour
add a reference to the UI Image that you want to use to show the transition and just update (it using a coroutine for example) to play the image sequence.