当前位置:网站首页>Unity UMP打包黑屏問題總結
Unity UMP打包黑屏問題總結
2022-07-19 04:36:00 【九本才】
我當前使用的Unity版本是2019.4.16f,在使用UMP進行監控視頻流播放的時候出現黑屏的問題。總結一下解决問題的辦法。
問題一:UMP插件版本問題
一開始我使用的是2.0.2版本的UMP發現這個版本在2019的unity中存在很多的問題,原本可以在Resources->UMPSettings配置相關的路徑,但是這個版本並不可以。所以請使用2.0.2版本以上的插件。

第二個問題 :dll的文件路徑問題
此是你會發現,打包後在你自己的電腦上播放時沒有問題的,但是把包發給同事還是會出現黑屏的問題。因為你得VLC是一個絕對路徑,在他人的電腦上是肯定找不到的。
1.取消勾選Use installed VLC

2.修改代碼UniversalMediaPlayer->Editor->UMPPostBuilds中的BuildWindowsPlayer64函數。
public static void BuildWindowsPlayer64(string path, UMPSettings settings)
{
string buildPath = Path.GetDirectoryName(path);
string dataPath = buildPath + "/" + Path.GetFileNameWithoutExtension(path) + "_Data";
if (!string.IsNullOrEmpty(buildPath))
{
if (!settings.UseExternalLibraries)
{
CopyPlugins(settings.AssetPath + "/Plugins/Win/x86_64/plugins/", dataPath + "/Plugins/plugins/");
//修改代碼
string[] files = Directory.GetFiles(dataPath + "/Plugins/x86_64/");
foreach (string str in files)
{
string file = Path.GetFileName(str);
Debug.LogError(file);
File.Copy(str, dataPath + "/Plugins/" + file);
}
Directory.Delete(dataPath + "/Plugins/x86_64/", true);
}
else
{
if (File.Exists(dataPath + "/Plugins/" + UMPSettings.LIB_VLC_NAME + ".dll"))
File.Delete(dataPath + "/Plugins/" + UMPSettings.LIB_VLC_NAME + ".dll");
if (File.Exists(dataPath + "/Plugins/" + UMPSettings.LIB_VLC_CORE_NAME + ".dll"))
File.Delete(dataPath + "/Plugins/" + UMPSettings.LIB_VLC_CORE_NAME + ".dll");
}
}
Debug.Log("Standalone Windows (x86_x64) build is completed: " + path);
}
問題三:64比特問題
打包的時候請打64比特的包。

边栏推荐
- 复旦微FMQL(国产Zynq) 【IAR裸机开发之PS】——非字节对齐访问
- Android kotlin自定义自动换行LinearLayout
- LeetCode之最大正方形(暴力求解和动态规划求解)
- ASP. Net1==visual studio create asp net demo
- ospf综合实验
- [daily question] sword finger offer II 041 Average value of sliding window
- Swift - Generic
- OSPF anti ring
- Overview of Baidu map technology, and application development of basic API and webapi
- 简历书写注意事项
猜你喜欢

2022/7/16 周赛

微信小程序之项目结构

TiDB学习笔记【初阶】

Gin framework principle

JS模态框

HCR Huichen is walking on the north slope, a giant beast swimming into digital marketing services

对称加密与非对称加密
![[Huang ah code] Introduction to MySQL - 5. Database tips: a single column group by will, and multiple columns?](/img/4d/552c4251779705a6dfd4ceb59c4261.png)
[Huang ah code] Introduction to MySQL - 5. Database tips: a single column group by will, and multiple columns?

ASP. Net1==visual studio create asp net demo

高仿网易云音乐UI的微信小程序源码
随机推荐
对称加密与非对称加密
golang反转reverse切片slice代码示例
Sg90 actuator experiment based on STM32, including code (HAL Library)
模拟服务器进行请求
C language explanation series - practice and consolidation of circular sentences, explanation of binary search
Apache22与opencms9.5集成配置
状态码含义详解
OSPF路由控制,防环相关知识
‘ionic‘ 不是内部或外部命令,也不是可运行的程序或批处理文件。
Xcode11 add a boot page (the launch images source option is missing after the upgrade)
Common go file writing methods
Brief introduction to cmtime
Cabasicanimation pause \ enterprise action
MySQL中的删除:delete、drop、Truncate三者的区别
Set administrator permissions for idea and console
使用Everything清理垃圾文件
[Vuforia] 图像识别的简单逻辑
Overview of Baidu map technology, and application development of basic API and webapi
OSPF routing control, anti ring related knowledge
Gin framework principle