Last active
April 19, 2022 06:22
-
-
Save lizhug/180efdac58c987a70881ad53f7eb15ad to your computer and use it in GitHub Desktop.
Unity Player Video In Background Raw Image/Unity启动页面背景播放视频,类似王者荣耀
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public string videoUrl; | |
public RawImage playRawImage; | |
public VideoPlayer videoPlayer; | |
void Start() | |
{ | |
videoPlayer.url = videoUrl; | |
} | |
// Update is called once per frame | |
void Update() | |
{ | |
if (videoPlayer.texture == null) | |
{ | |
return; | |
} | |
playRawImage.texture = videoPlayer.texture; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment