Sumit Pal
Sumit Pal

Reputation: 245

Is it possible to add animated intro to splash screen in unity.?

i am learning unity and i want to know... if it is possible to add small animated intro video or .gif animations to splash screen in unity? if yes, then how to do it? i have tried to change splash screen using player setting but .gif animation is not working.

Upvotes: 2

Views: 14393

Answers (2)

Sumit Pal
Sumit Pal

Reputation: 245

I got it, Just wanted to share my code it might be helpful for someone.

public class PlayIntro : MonoBehaviour {

    private string movie = "Logo_Intro.mov";

    void Start () 
    {
        StartCoroutine(streamVideo(movie));
    }

    private IEnumerator streamVideo(string video)
    {
        Handheld.PlayFullScreenMovie(video, Color.black, FullScreenMovieControlMode.Hidden, FullScreenMovieScalingMode.Fill);
        yield return new WaitForEndOfFrame ();
        SceneManager.LoadScene ("Game");
    }
}

Upvotes: 3

Programmer
Programmer

Reputation: 125275

The answer is actually yes or no depending on how you want to do this.

Is it possible to add animated/intro video to splash screen in Unity from the Player Settings?

No. You can only add images to Unity's splash screen system from this menu.

Is it possible to add animated/intro video to Unity?

Yes. Make an intro scene and make it to be the first scene to load from the Build Settings. Use Unity's VideoPlayer API to load and play the intro video when this into scene loads. When the intro video is done playing, load your main scene.

Upvotes: 7

Related Questions