Hi everybody, I am searching for solution for this problem. I am not very keen on using Java languages, so if you can help me with advise or something in C# I would be very thankful. I tried some methods but nothing worked for Android actually working only for Windows.
First have a gameObject with a VideoPlayer component: ![1]
Second add this script to a gameObject:
using UnityEngine;
using UnityEngine.Video;
public class VideoFromFile: MonoBehaviour
{
public VideoPlayer vPlayer;
private void Start()
{
vPlayer.url = "path/to/video/or/a/video/in/the/web";
vPlayer.Play();
}
}
Then drag the Video Player to VPlayer in the inspector:
And then you are ready.
Remember to change the path to the video in the script
Thank you for this but I have already tried it. However I am looking for solution how to load a video from device gallery.