基本上我在随机位置和项目文件夹中构建我的项目,没有任何工作,所以我想知道它是否是其他东西。我收到了这些错误:
Error 1: Error building Player: DirectoryNotFoundException: Directory '/Shaders/Water' not found.
Error 2: Build completed with a result of 'Failed'
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Error 3: UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0020e] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:181
at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00065] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:88
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Error 4: DirectoryNotFoundException: Directory '/Shaders/Water' not found.
System.IO.Directory.GetFileSystemEntries (System.String path, System.String searchPattern, FileAttributes mask, FileAttributes attrs) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/Directory.cs:514)
System.IO.Directory.GetFiles (System.String path, System.String searchPattern) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/Directory.cs:308)
System.IO.Directory.GetFiles (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/Directory.cs:303)
UltimateWater.Editors.EditorShaderCollectionBuilder.CleanUpUnusedShaders () (at Assets/Ultimate Water System v1.0.0/Scripts/Editor/EditorShaderCollectionBuilder.cs:54)
UltimateWater.Editors.WaterShadersCleanupTask.OnWillSaveAssets (System.String[] paths) (at Assets/Ultimate Water System v1.0.0/Scripts/Editor/EditorShaderCollectionBuilder.cs:140)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.AssetModificationProcessorInternal.OnWillSaveAssets (System.String[] assets, System.String[]& assetsThatShouldBeSaved, System.String[]& assetsThatShouldBeReverted, Int32 explicitlySaveAsset) (at C:/buildslave/unity/build/Editor/Mono/AssetModificationProcessor.cs:147)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
任何人都可以了解需要做什么,谢谢。
项目建设
答案 0 :(得分:1)
我遇到了类似的问题,但不完全是这样。 您可以尝试在项目设置 > 播放器下更改 API 兼容性级别。
在寻找解决方案时,我发现人们正在切换到.Net2,但我的默认情况下是.Net2,因此我切换到.Net 4.x并成功构建。
答案 1 :(得分:0)
答案 2 :(得分:0)
就我而言,Unity Monetization插件出现问题,我重新安装了它,现在一切正常
答案 3 :(得分:0)
最后我发现它只是按照步骤操作。