unity3D报错

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了unity3D报错相关的知识,希望对你有一定的参考价值。

UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00242] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:190
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:95
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

Build completed with a result of 'Failed'
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

UnityException: Build path contains project built with "Create Visual Studio Solution" option, which is incompatible with current build settings. Consider building your project into an empty directory.
UnityEditor.WindowsStandalone.WindowsDesktopStandalonePostProcessor.CheckSafeProjectOverwrite (UnityEditor.Modules.BuildPostProcessArgs args) (at C:^ildslave/unity^ild/PlatformDependent/WinPlayer/Extensions/Managed/WindowsDesktopStandalonePostProcessor.cs:56)
DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at C:^ildslave/unity^ild/Editor/Mono/BuildPipeline/DesktopStandalonePostProcessor.cs:38)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at C:^ildslave/unity^ild/Editor/Mono/BuildPipeline/DesktopStandalonePostProcessor.cs:59)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at C:^ildslave/unity^ild/Editor/Mono/Modules/DefaultBuildPostprocessor.cs:27)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at C:^ildslave/unity^ild/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:281)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

提示的内容是让你把所有的错误解决然后再运行游戏。unity左下角那个红色的叹号是错误的详细信息,你点一下就会弹出窗口。具体什么错就得你自己改了。在inspector面板中没有显示你自己定义变量speed这个问题,我不太清楚var speed:int这样写在java中是公有还是私有,你最好在前面加上public。因为只有被序列化的变量才会在inspector面板显示出来。追问

C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:281

这个路径它不存在啊

参考技术A 重新建立一个新的文件夹输出就可以了,遇到了同样的问题,亲测有效

windows10 composer 安装报错?

一直报错,证书也装了,希望大神解答

参考技术A SSL证书过期了吧
确认清楚再试吧

以上是关于unity3D报错的主要内容,如果未能解决你的问题,请参考以下文章

Unity3D之报错 - Instantiating a non-readable texture is not allowed!

Unity3D 问题总结Unity报错提示:Asset database transaction committed twice

Unity3d 2021版本播放视频组件VideoPlayer报错The type name ‘VideoPlayer‘ could not be found in the namespace...

Unity3D 问题总结Unity报错提示:InvalidOperationException: Collection was modified; enumeration operation ma(代

Unity3D 问题总结Unity报错提示:InvalidOperationException: Collection was modified; enumeration operation ma(代

Unity3d 2020版本发布WebGL报错Uncaught SyntaxError: Invalid or unexpected token 和unityFramework is not...修正