Export APK, can not use the film texture, so we can only use this method
This one
Handheld.playfullscreenmovie ();
or This function
Iphoneutils.playmovie ();
voidOngui () {if(GUI. Button (NewRect (Screen.width/2-Ten, Screen.height/2-Ten, -, -),"(h) Cancelontouch") {Handheld.playfullscreenmovie ("123.mp4", Color.Black, fullscreenmoviecontrolmode.canceloninput); } if(GUI. Button (NewRect (Screen.width/2-Ten, Screen.height/2+Ten, -, -),"(h) full") {Handheld.playfullscreenmovie ("123.mp4", Color.Black, fullscreenmoviecontrolmode.full); } if(GUI. Button (NewRect (Screen.width/2-Ten, Screen.height/2+ -, -, -),"(h) Hidden") {Handheld.playfullscreenmovie ("123.mp4", Color.Black, Fullscreenmoviecontrolmode.hidden); } if(GUI. Button (NewRect (Screen.width/2-Ten, Screen.height/2+ -, -, -),"(h) Minimal") {Handheld.playfullscreenmovie ("123.mp4", Color.Black, fullscreenmoviecontrolmode.minimal); } }
There are four modes of Fullscreenmoviecontrolmode ,
1. Touch screen video off during video playback
2. When the video player pops up the iOS advanced control, controls the video pause to play fullscreen, and so on.
3. The video cannot be stopped when it plays, and automatically shuts down when it plays
4. When the video is playing, the iOS advanced control is ejected to control the playback progress.
Four types of modes
Iphoneutils.playmovie ();
is the same
voidOngui () {if(GUI. Button (NewRect (Screen.width/2- the, Screen.height/2-Ten, -, -),"(i) Cancelontouch") {Iphoneutils.playmovie ("123.mp4", Color.Black, Iphonemoviecontrolmode.cancelontouch, Iphonemoviescalingmode.aspectfit); } if(GUI. Button (NewRect (Screen.width/2- the, Screen.height/2+Ten, -, -),"(i) full") {Iphoneutils.playmovie ("123.mp4", Color.Black, Iphonemoviecontrolmode.full, Iphonemoviescalingmode.aspectfit); } if(GUI. Button (NewRect (Screen.width/2- the, Screen.height/2+ -, -, -),"(i) Hidden") {Iphoneutils.playmovie ("123.mp4", Color.Black, Iphonemoviecontrolmode.hidden, Iphonemoviescalingmode.aspectfit); } if(GUI. Button (NewRect (Screen.width/2- the, Screen.height/2+ -, -, -),"(i) Minimal") {Iphoneutils.playmovie ("123.mp4", Color.Black, Iphonemoviecontrolmode.minimal, Iphonemoviescalingmode.aspectfit); } }
Iphonemoviecontrolmode 's method is obsolete and can be replaced by Fullscreenmoviecontrolmode
Iphonemoviescalingmode is the mode of scale adjustment, which is set to null on the line.
It's common sense to play it,
But another problem came up.
Don't play the video, it's dark, but it shows the final time
This is the phone resolution problem, remember that the resolution (game panel) must be the same as the phone settings, otherwise it will not play