Exemplo n.º 1
0
    void PlayVideo(string name)
    {
        VideoClip clip = Resources.Load <VideoClip>(name);

        rawImage.Active();
        vPlayer.clip = clip;
        RenderTexture renderTexture = Resources.Load <RenderTexture>("videoTexture");

        if (renderTexture != null)
        {
            vPlayer.targetTexture = renderTexture;
            rawImage.texture      = renderTexture;
        }
        vPlayer.loopPointReached += EndReached;
        vPlayer.Play();
    }