您的位置:首页 > 移动开发 > Unity3D

Unity 在IOS上播放视频不能跳过

2017-11-01 11:50 381 查看
在Unity生成的Xcode项目找到到FullScreenVideoPlayer.mm

在最后添加

@interface UIWindow(VideoPlay) 
@end

@ UI实现UIWindow(VideoPlay) 
- (void)touchesBegan:(NSSet <UITouch *> *)触摸与事件:(UIEvent *)事件{ 
[super touchesBegan:touches withEvent:event]; 

NSString * version = [UIDevice currentDevice] .systemVersion; 
if(version.doubleValue> = 11 && UnityIsFullScreenPlaying()){ 
UnityStopFullScreenVideoIfPlaying(); 


@end
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: