Search Unity

3 second video spalsh screen before game loads???

Discussion in 'iOS and tvOS' started by etomp10291, Jun 7, 2010.

  1. etomp10291

    etomp10291

    Joined:
    Jan 11, 2010
    Posts:
    108
    I am wanting to add a 3 second splash video at start of my game app, like storm8 apps. I realize it will be something to do with mpmovieplayer, but how do i do it in unity??? Also, I noticed when playing with mpmovieplayer the controls are still there, would need those gone as well.

    Any help or guidance in the right direction would be much appreciated...

    Thanks!
     
  2. etomp10291

    etomp10291

    Joined:
    Jan 11, 2010
    Posts:
    108
    Found this code in the reference material for Unity, but not for unity iphone...



    // this line of code will make the Movie Texture begin playing
    renderer.material.mainTexture.Play();

    Attach the following script to toggle Movie playback when the space bar is pressed:

    function Update () {
    if (Input.GetButtonDown ("Jump")) {
    if (renderer.material.mainTexture.isPlaying) {
    renderer.material.mainTexture.Pause();
    }
    else {
    renderer.material.mainTexture.Play();
    }
    }
    }