I have several GameObjects instantiated, all of them have a video player component, all those objects are inside a main canvas and should be able to play the video simultaneously.
When I assign one of them a new clip, ALL of them start playing over again and change their resource to the new one. Of course, it should only change the one I actually assign it it.
I have made sure, the function below gets only called ONCE and on the correct object.
I also printed the hash codes of the videos player to make sure they are different objects, and they are.
Does anyone have any idea what could cause this ?
How I assign the clip
public virtual void SetVideoResource(string fileName)
{
videoName = fileName;
textPanel.SetActive(false);
videoPanel.SetActive(true);
videoPlayer = videoPanel.GetComponentInChildren<VideoPlayer>();
videoPlayer.clip = (VideoClip)Resources.Load("Videos/" + fileName);
Debug.Log(videoPlayer.GetHashCode());
}
Setup of my Video Player component
And the target texture
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…