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 去掉勾选