一、 報錯信息
在 Unity 編輯器中 , 選擇 " 菜單欄 | File | Build Settings " 選項 , 編譯 Android Apk 文件 ;
報如下錯誤 :
BuildFailedException: Platform Android with graphics API OpenGLES3 is not supported with HDRP, use the Vulkan graphics API instead.
Change the platform/device to a compatible one or remove incompatible graphics APIs.
UnityEditor.Rendering.HighDefinition.HDRPPreprocessBuild.OnPreprocessBuild (UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.render-pipelines.high-definition@10.10.0/Editor/BuildProcessors/HDRPPreprocessBuild.cs:78)
UnityEditor.Build.BuildPipelineInterfaces+<>c__DisplayClass15_0.<OnBuildPreProcess>b__1 (UnityEditor.Build.IPreprocessBuildWithReport bpp) (at <dbd4d07218194e5c9818b750c6847ce1>:0)
UnityEditor.Build.BuildPipelineInterfaces.InvokeCallbackInterfacesPair[T1,T2] (System.Collections.Generic.List`1[T] oneInterfaces, System.Action`1[T] invocationOne, System.Collections.Generic.List`1[T] twoInterfaces, System.Action`1[T] invocationTwo, System.Boolean exitOnFailure) (at <dbd4d07218194e5c9818b750c6847ce1>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
二、 解決方案
報錯信息 Platform Android with graphics API OpenGLES3 is not supported with HDRP, use the Vulkan graphics API instead.
, HDRP不支持帶有圖形API OpenGLES3的平臺Android,請使用Vulkan圖形API代替 ;
HDRP 是 高清渲染管線 , 英文全稱為 High Definition Render Pipeline ;
HDRP 的 Unity 工程 如果導出 Android 平臺的應用 , 不能選擇 OpenGLES3 作為導出的安卓平臺引擎 , 必須選擇 Vulkan 引擎 API ;
在 Unity 編輯器 中 , 選擇 " 菜單欄 | File | Build Settings | Player Settings… " , 早 Player Settings 對話框中 , 選擇 Android 面板 , 選擇 Other Settings 選項 , 修改其中的 " Graphics APIs " 設置 , 刪除 OpenGLES2 和 OpenGLES3 選項 , 只保留 Vulkan 選項 ;
刪除后的效果 : 只保留一個 Vulkan 圖形引擎 ;文章來源:http://www.zghlxwxcb.cn/news/detail-531948.html
文章來源地址http://www.zghlxwxcb.cn/news/detail-531948.html
到了這里,關于【錯誤記錄】Unity 安卓打包報錯( Platform Android with graphics API OpenGLES3 is not supported with HDRP )的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!