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.
Asked
Active
Viewed 1.2k times
2
-
Can you post the code you tried? – Josh Adams Jan 22 '18 at 12:54
-
@JoshAdams i didn't try it using any code... i am just doing it through the splash screen option inside player settings which opens in inspector tab. – Sumit Pal Jan 22 '18 at 12:58
2 Answers
7
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.

Programmer
- 121,791
- 22
- 236
- 328
-
can you tell me the script to change scene after waiting for some seconds... like my 1st scene is an intro of 5sec i want the scene to automatically switch to 2nd scene after 5 or 6 sec... i just need the script. – Sumit Pal Jan 22 '18 at 13:56
-
See [How to wait in Unity](https://stackoverflow.com/questions/30056471/how-make-the-script-wait-sleep-in-a-simple-way-in-unity/30065183#30065183). Note that it's bad to wait for x seconds then load new scene. Just wait for the video to finish playing then load new scene. See the link in this answer which shows how to play video. If you use the answer linked, the video ends before the `Debug.Log("Done Playing Video");`. Put your loading function after that line of code. That's it. – Programmer Jan 22 '18 at 14:05
-
-
Game intros are made with videos not with gifs. Gifs are not suitable for this. If you still want to use gif then you need such as [this](https://assetstore.unity.com/packages/tools/video/ugif-61081) to load .gif or you can make your own to read gif files. – Programmer Jan 22 '18 at 14:12
2
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");
}
}

Sumit Pal
- 235
- 1
- 3
- 13