赞
踩
用Unity build一个VR项目的时候,即使已经安装了相关SDK和通用平台工具了但还是报以下错误:
Build completed with a result of 'Failed' in 8 seconds (8257 ms) Internal build system error. BuildProgram exited with code 1. Unity.IL2CPP.Bee.BuildLogic.ToolchainNotFoundException: IL2CPP C++ code builder is unable to build C++ code. In order to build C++ code for UWP, you must have one of these installed: * Visual Studio 2022 or newer with C++ compilers and Windows 10 (or newer) SDK (recommended) * Visual Studio 2019 with C++ compilers and Windows 10 (or newer) SDK * Visual Studio 2017 with C++ compilers and Windows 10 (or newer) SDK * Visual Studio 2015 with C++ compilers and Windows 10 (or newer) SDK Visual Studio 2017 (or newer) is detected using `vswhere.exe` as well as VSCOMNTOOLS environment variables. Visual Studio 2015 is detected by looking at "SOFTWARE\Microsoft\VisualStudio\14.0_Config\InstallDir" in the registry as well as VSCOMNTOOLS environment variables. Windows 10 (or newer) SDK is detected by looking at "SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0\InstallationFolder" in the registry. Unable to detect any compatible Visual Studio installation! * Found Visual Studio 2022 installation without support for architecture arm64 * Found Visual Studio 2019 installation without support for architecture arm64 at Unity.IL2CPP.Bee.BuildLogic.UniversalWindows.UWPBuildLogic.UserAvailableToolchainFor(Architecture architecture) at UWPPlayerBuildProgram.UWPPlayerBuildProgram.<>c__DisplayClass67_0.<SetupCreateVisualStudioSolution>b__3() at Bee.Core.TinyProfiler2Base.Section[T](String label, Func`1 func, Dictionary`2 metadata) at UWPPlayerBuildProgram.UWPPlayerBuildProgram.SetupCreateVisualStudioSolution() at UWPPlayerBuildProgram.UWPPlayerBuildProgram.SetupPlayerBuild() at PlayerBuildProgramLibrary.PlayerBuildProgramBase.RunBuildProgram() at PlayerBuildProgramTypeWrapper.Run(String[] args) at Program.Main(String[] args) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
原因是因为自己没有安装IL2CPP的插件,故进入到Unity HUB里面:
点击设置按钮-添加模块:
可以看到IL2CPP确实没有勾选,罪魁祸首终于找到了T T
勾选后等待安装即可,记得这时候要把visual studio退出来。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。