Can‘t find LibVLC libraries, try to check the settings file in UMP ‘Resources‘ folder.

VLC目录不对:
查看一下标记修改项
1、修改UMPPostBuilds.cs

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/x86_64/plugins/");
            }
            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);
    }

2、修改UMPSettings.cs

        public string GetLibrariesPath(Platforms platform, bool externalSpace)
        {
            string librariesPath = string.Empty;

            if (platform != Platforms.None)
            {
                if (!externalSpace)
                {
                    if (Application.isEditor)
                    {
                        librariesPath = Path.Combine(_assetPath, PLUGINS_FOLDER_NAME);
                        librariesPath = Path.Combine(librariesPath, PlatformFolderName(platform));
					  
                        if (platform == Platforms.Win || platform == Platforms.Mac || platform == Platforms.Linux)
                            librariesPath = Path.Combine(librariesPath, EditorBitModeFolderName);
                    }
                    else
                    {
                        librariesPath = Path.Combine(Application.dataPath, PLUGINS_FOLDER_NAME);
						//修改项
                        if (platform == Platforms.Win || platform == Platforms.Mac || platform == Platforms.Linux)
                            librariesPath = Path.Combine(librariesPath, EditorBitModeFolderName);
                    }

                    if (platform == Platforms.Mac)
                        librariesPath = Path.Combine(librariesPath, Path.Combine(MAC_LIBVLC_PACKAGE_NAME, MAC_PACKAGE_LIB_PATH));

                    if (!Directory.Exists(librariesPath))
                        librariesPath = string.Empty;
                }
                else
                {
                    if (platform == Platforms.Win)
                    {
                        librariesPath = NativeInterop.ReadLocalRegKey(EditorBitMode == BitModes.x86 ? WIN_REG_KEY_X86 : WIN_REG_KEY_X86_64, "InstallDir");
                    }

                    if (platform == Platforms.Mac)
                    {
                        var appsFolderInfo = new DirectoryInfo(MAC_APPS_FOLDER_NAME);
                        var packages = appsFolderInfo.GetDirectories();

                        foreach (var package in packages)
                        {
                            if (package.FullName.ToLower().Contains(MAC_VLC_PACKAGE_NAME))
                                librariesPath = Path.Combine(package.FullName, MAC_PACKAGE_LIB_PATH);
                        }
                    }

                    if (platform == Platforms.Linux)
                    {
                        DirectoryInfo appsFolderInfo = null;

                        foreach (var appFolder in LIN_APPS_FOLDERS_PATHS)
                        {
                            if (Directory.Exists(appFolder))
                                appsFolderInfo = new DirectoryInfo(appFolder);

                            if (appsFolderInfo != null)
                            {
                                var appsLibs = appsFolderInfo.GetFiles();

                                foreach (var lib in appsLibs)
                                {
                                    if (lib.FullName.ToLower().Contains(LIB_VLC_NAME))
                                        librariesPath = appFolder;
                                }
                            }
                        }
                    }
                }

                if (!librariesPath.Equals(string.Empty))
                    librariesPath = Path.GetFullPath(librariesPath + Path.AltDirectorySeparatorChar);
            }

            return librariesPath;
        }

3、再UMPSetting中Use Installed VLC 去掉勾选

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值