当前位置:网站首页>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比特的包。

边栏推荐
- 使用Everything清理垃圾文件
- T+0变T+1!快赎金额降至1万!又有银行调整现金理财产品申赎规则
- 策略模式代替if-else
- Optimization and configuration of OSPF
- LeetCode-移除元素
- Cabasicanimation pause \ enterprise action
- About the problem of database, the concept of uniqueness and non repetition
- 使用小丸工具箱进行极限视频压缩
- OSPF的优化和配置
- [pits]packets go:428: busy buffer invalid connection
猜你喜欢

深度学习中的标量、向量、矩阵和张量的区别
![[ruoyi Vue plus] learning notes 30 - redisson (VI) bounded blocking queue (redisson source code + Lua script)](/img/56/f52d13f86764768eee190e22ba136a.png)
[ruoyi Vue plus] learning notes 30 - redisson (VI) bounded blocking queue (redisson source code + Lua script)

数据分析报告这样写,才算真正读懂了数据

使用__slots__和__dict__来节省空间(简直就是质的飞越,LeetCode亲测有效)

Thesis research NLP

How to open the applet for people near wechat (the way to open the applet near wechat)

CAD video course recommendation station B

T + 0 to t + 1! The quick redemption amount is reduced to 10000! Another bank adjusted the rules for the application and redemption of cash wealth management products

异或和加密方式的解密的复现

ASP. Net1==visual studio create asp net demo
随机推荐
高仿网易云音乐UI的微信小程序源码
AttributeError: ‘NoneType‘ object has no attribute ‘sort‘
C list set object de duplication LINQ de duplication with time de duplication
[Huang ah code] Introduction to MySQL - 5. Database tips: a single column group by will, and multiple columns?
Sphinx遇到的问题
Mature threads should know how to refuse
基于JIRA7.9.2定制修改
Hello World driver
安全第三天iptables防止nmap扫描以及binlog
surging作者出具压测结果
Autojs learning - realize blissful pure land
IPhone device numbers of major models
tf.AUTO_REUSE的作用
Sg90 actuator experiment based on STM32, including code (HAL Library)
MySQL表的约束(基础篇)
How to open the applet for people near wechat (the way to open the applet near wechat)
Common go file writing methods
Apache22与opencms9.5集成配置
WildFly:如何从位于另一个应用程序中的 EJB 调用 EJB
C language explanation series - practice and consolidation of circular sentences, explanation of binary search