前提・実現したいこと
Unity(2020.3.12f1)で簡単なアニメーションのWebGLビルドをしようとしていますが,
ビルドエラーが出てうまくいきません.
発生している問題・エラーメッセージ
Exception: Unity.IL2CPP.Building.BuilderFailedException: ImportError: No module named site
Invocation was: Executable: "C:\Program Files\Unity\2020.3.12f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\python.exe"
Arguments: -E "C:\Program Files\Unity\2020.3.12f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\em++" -Wno-unused-value -Wno-invalid-offsetof -nostdinc -fno-strict-overflow -Wno-null-conversion -std=c++11 -O3 -Oz -DIL2CPP_EXCEPTION_DISABLED=1 -DNET_4_0 -DUNITY_AOT -DIL2CPP_MONO_DEBUGGER_DISABLED -DGC_NOT_DLL -DRUNTIME_IL2CPP -DBASELIB_INLINE_NAMESPACE=il2cpp_baselib -DNDEBUG -I"C:\Program Files\Unity\2020.3.12f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\2020.3.12f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\2020.3.12f1\Editor\Data\il2cpp\external\bdwgc\include" -I"C:\Program Files\Unity\2020.3.12f1\Editor\Data\il2cpp\external\xxHash" -I"C:\Program Files\Unity\2020.3.12f1\Editor\Data\il2cpp\external\baselib\Include" -I"C:\Program Files\Unity\2020.3.12f1\Editor\Data\il2cpp\external\baselib\Platforms\WebGL\Include" -I"C:\Program Files\Unity\2020.3.12f1\Editor\Data\il2cpp\libil2cpp\pch" -I"C:\UnityProjects\Test\Library\Il2cppBuildCache\WebGL\il2cppOutput" "C:\UnityProjects\Test\Library\Il2cppBuildCache\WebGL\il2cppOutput\Il2CppCCalculateFieldValues.cpp" -o "C:\UnityProjects\Test\Library\il2cpp_cache\4F3F785D8934C5CAAE3CC8F19F44A33E.o"
at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector) at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics) at il2cpp.Compilation.CompilationDriver.Run(RuntimePlatform platform, BuildingOptions buildingOptions, ReadOnlyCollection
1 matchedAssemblyMethodSourceFiles)
at il2cpp.Program.DoRun(String[] args, RuntimePlatform platform, BuildingOptions buildingOptions, Boolean throwExceptions)
UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at <dc14d30a5e0540ee9311ed6df63d9074>:0)
UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action1[T] setupStartInfo) (at <dc14d30a5e0540ee9311ed6df63d9074>:0) UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List
1[T] arguments, System.Action1[T] setupStartInfo) (at <dc14d30a5e0540ee9311ed6df63d9074>:0) UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data) (at <dc14d30a5e0540ee9311ed6df63d9074>:0) UnityEditorInternal.IL2CPPBuilder.Run () (at <dc14d30a5e0540ee9311ed6df63d9074>:0) UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action
1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <dc14d30a5e0540ee9311ed6df63d9074>:0)
UnityEditor.WebGL.WebGlBuildPostprocessor.CompileBuild (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:365)
UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:913)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <dc14d30a5e0540ee9311ed6df63d9074>:0)
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 <dc14d30a5e0540ee9311ed6df63d9074>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
試したこと
当初以下のエラーが出ていました↓
Exception: Unity.IL2CPP.Building.BuilderFailedException: File "C:\Users\Username\AppData\Local\Programs\Python\Python38-32\lib\site.py", line 177
print("Error processing line {:d} of {}:\n".format(n+1, fullname), file=sys.stderr)
^
SyntaxError: invalid syntax
etc.
Unityの内部のPythongが2系のようで,すでにPCに入っていたPython3.8との依存関係が悪かったのかと思い,そのPythonをアンインストールしたところ,site.pyが見つからなくなってしまったようです.
すみませんがよろしくお願いします.
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。