Homebrew Question Trouble building for Swich with Unity3D

  • Thread starter Thread starter mcdij
  • Start date Start date
  • Views Views 96,792
  • Replies Replies 290
Hi guys, how are you? I wonder if any of you have already been able to build for Nintendo Switch with Unity and which version has no errors? I have in my possession files that look like the SDK but I need help or a tutorial class on how to organize everything so that it works 100%. I leave you this image Thank you...:)
directory.jpg

the question is What do I need to build an app for Switch? thanks guys
 
Last edited by XyzPixel,
Hi guys, how are you? I wonder if any of you have already been able to build for Nintendo Switch with Unity and which version has no errors? I have in my possession files that look like the SDK but I need help or a tutorial class on how to organize everything so that it works 100%. I leave you this image Thank you...:)View attachment 318166
the question is What do I need to build an app for Switch? thanks guys
you should have download the sdk 14.3 everything will be jnstalled directly to your pc except the unity and support module for switch
 
  • Like
Reactions: Slluxx
greetings I just finish porting my game to switch using 2019.4.40f1 using sdk 14.3
i got the nsp tried to check it with ryujinx but it gave me blank icon and name unknown 000000000000
does anyone encountered that? or did i screw up my build?

here's the logcat anyway from ryujinx

|W| GUI.ApplicationLibraryThread Application LoadApplications: The header key is incorrect or missing and therefore the NCA header content type check has failed. Errored File: D:\Documents\Unity Projects\MYGAME\MYGAME.nsp

and when i try to run it

00:00:00.123 |I| Gpu : Backend Threading (Auto): True
00:00:00.778 |N| Application LoadApplication: Using Firmware Version: 14.1.2
00:00:00.779 |I| Application LoadApplication: Loading as NSP.
00:00:00.801 |E| Loader LoadNsp: Unable to load NSP: Unable to decrypt NCA header. The file is not an NCA file or the header key is incorrect.
 
greetings I just finish porting my game to switch using 2019.4.40f1 using sdk 14.3
i got the nsp tried to check it with ryujinx but it gave me blank icon and name unknown 000000000000
does anyone encountered that? or did i screw up my build?

here's the logcat anyway from ryujinx

|W| GUI.ApplicationLibraryThread Application LoadApplications: The header key is incorrect or missing and therefore the NCA header content type check has failed. Errored File: D:\Documents\Unity Projects\MYGAME\MYGAME.nsp

and when i try to run it

00:00:00.123 |I| Gpu : Backend Threading (Auto): True
00:00:00.778 |N| Application LoadApplication: Using Firmware Version: 14.1.2
00:00:00.779 |I| Application LoadApplication: Loading as NSP.
00:00:00.801 |E| Loader LoadNsp: Unable to load NSP: Unable to decrypt NCA header. The file is not an NCA file or the header key is incorrect.
Did you decrypt the NSP with dev key and reencrypt it with the retail key? There should be instructions for that in this thread.
 
Unity.IL2CPP.Building.BuilderFailedException: Build failed with 0 successful nodes and 1 failed ones
Annotation: IL2CPP_CodeGenAndCompile C:/Users/USER/Documents/ssc4nx/SwitchIL2CPPCache/il2cpp_cache/buildstate/artifacts/il2cpp_conv_38yp.traceevents
Cmdline: "C:\Program Files\Unity 2021.2.0b11\Editor\Data\il2cpp\build\deploy\net5.0\il2cpp.exe" --convert-to-cpp --compile-cpp --directory="C:/Users/USER/Documents/ssc4nx/Temp/StagingArea/Managed" --data-folder="C:\Users\USER\Documents\ssc4nx\Library\Il2cppBuildCache\Switch\il2cppOutput\Data" --generatedcppdir="C:/Users/USER/Documents/ssc4nx/Library/Il2cppBuildCache/Switch/il2cppOutput" --symbols-folder="C:\Users\USER\Documents\ssc4nx\Library\Il2cppBuildCache\Switch\il2cppOutput\Symbols" --additional-cpp="C:\Users\USER\Documents\ssc4nx\Temp\StagingArea\SourcePlugins\UnityAdsInitializationListener.h" --additional-cpp="C:\Users\USER\Documents\ssc4nx\Temp\StagingArea\SourcePlugins\UnityAdsShowListener.h" --additional-cpp="C:\Users\USER\Documents\ssc4nx\Temp\StagingArea\SourcePlugins\UnityAdsLoadListener.h" --additional-cpp="C:/Users/USER/Documents/ssc4nx/Library/Il2cppBuildCache/Switch/additionalCppFiles/UnlinkedFunctions.cpp" --enable-stats --enable-array-bounds-check --code-generation-option=EnableInlining --generics-option=None,EnableFullSharing --stats-output-dir="C:/Users/USER/Documents/ssc4nx/Assets/../SwitchIL2CPPStats" --platform=Switch --architecture=ARM64 --outputpath="C:\Users\USER\Documents\ssc4nx\Library/Il2cppBuildCache/Switch\Native\SwitchPlayer.nss" --dont-deploy-baselib --verbose --libil2cpp-static --baselib-directory="C:\Program Files\Unity 2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Native\release" --avoid-dynamic-library-copy --additional-defines=DEBUGMODE=0 --additional-defines=UNITY_RELEASE=1 --additional-defines=IL2CPP_USE_SOCKET_MULTIPLEX_IO=1 --additional-include-directories="C:\Program Files\Unity 2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools/il2cpp\bdwgc/include" --additional-include-directories="C:\Program Files\Unity 2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools/il2cpp\libil2cpp/include" --plugin="C:/Program Files/Unity 2021.2.0b11/Editor/Data/PlaybackEngines/Switch/Tools\SwitchIl2CppPlugin.dll" --incremental-g-c-time-slice=3 --configuration=ReleasePlus --linker-flags-file="C:/Users/USER/Documents/ssc4nx/SwitchIL2CPPCache/il2cpp_cache/linkerflags/linkerflags.txt" --dotnetprofile=unityaot-linux --cachedirectory="C:/Users/USER/Documents/ssc4nx/Assets/../SwitchIL2CPPCache/il2cpp_cache" --profiler-report --profiler-output-file="C:/Users/USER/Documents/ssc4nx/SwitchIL2CPPCache/il2cpp_cache/buildstate/artifacts/il2cpp_conv_38yp.traceevents"
ExitCode: 1
Stdout:
Building SwitchPlayer.nss with SwitchToolChain
Output directory: C:\Users\USER\Documents\ssc4nx\Library\Il2cppBuildCache\Switch\Native
Cache directory: C:\Users\USER\Documents\ssc4nx\SwitchIL2CPPCache\il2cpp_cache
Error: Unity.IL2CPP.Building.BuilderFailedException: In file included from C:\Program Files\Unity 2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools\il2cpp\libil2cpp\os\SocketImpl.cpp:10:
C:\Program Files\Unity 2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools\il2cpp\libil2cpp\os/PlatformSocketConsts.h(5,10) : fatal error: 'nnc/socket/socket_Types.h' file not found
#include <nnc/socket/socket_Types.h> // sockaddr, sockaddr_in, pollfd, hostent etc...
^
1 error generated.


Invocation was: Executable: "C:\NintendoDev\NintendoSDK16.7_NXaddon\NintendoSDK\Compilers\NX\nx\aarch64\bin\clang.exe"
Arguments: -c -x c++ -std=gnu++14 -MD -fexceptions -funsigned-char -ffunction-sections -fPIC -fno-common -fno-rtti -fvectorize -fno-strict-aliasing -fno-short-enums -fdiagnostics-format=msvc -mno-implicit-float -mcpu=cortex-a57+fp+simd+crypto+crc -Wall -O3 -fno-strict-overflow -fdata-sections -DDEBUGMODE=0 -DUNITY_RELEASE=1 -DIL2CPP_USE_SOCKET_MULTIPLEX_IO=1 -DNET_4_0 -DUNITY_AOT -DIL2CPP_MONO_DEBUGGER_DISABLED -DGC_NOT_DLL -DRUNTIME_IL2CPP -DIL2CPP_ENABLE_WRITE_BARRIERS=1 -DIL2CPP_INCREMENTAL_TIME_SLICE=3 -DBASELIB_INLINE_NAMESPACE=il2cpp_baselib -DIL2CPP_DEFAULT_DATA_DIR_PATH=Data -D__arm64__ -DNN_BUILD_TARGET_PLATFORM_NX -DNN_NINTENDO_SDK -DNN_SDK_BUILD_RELEASE -DNN_DISABLE_LOG -DENABLE_SCRIPTING_GC_WBARRIERS -I"C:\Program Files\Unity 2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools\il2cpp\bdwgc\include" -I"C:\Program Files\Unity 2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools\il2cpp\libil2cpp\include" -I"C:\Program Files\Unity 2021.2.0b11\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity 2021.2.0b11\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity 2021.2.0b11\Editor\Data\il2cpp\external\bdwgc\include" -I"C:\Program Files\Unity 2021.2.0b11\Editor\Data\il2cpp\external\xxHash" -I"C:\Program Files\Unity 2021.2.0b11\Editor\Data\il2cpp\external\baselib\Include" -I"C:\Program Files\Unity 2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools\il2cpp\external\baselib\Platforms\Switch\Include" -I"C:\Program Files\Unity 2021.2.0b11\Editor\Data\il2cpp\libil2cpp\pch" -I"C:\Program Files\Unity 2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools\il2cpp\libil2cpp" -I"C:\Program Files\Unity 2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools\il2cpp\libil2cpp\os\c-api" -I"C:\Program Files\Unity 2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools\il2cpp\libil2cpp\os" -I"C:\Program Files\Unity 2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools\il2cpp\external\bdwgc" -I"C:\Program Files\Unity 2021.2.0b11\Editor\Data\il2cpp\external\bdwgc\libatomic_ops\src" -I"C:\NintendoDev\NintendoSDK16.7_NXaddon\NintendoSDK\Compilers\NX\nx\aarch64\include" -I"C:\NintendoDev\NintendoSDK16.7_NXaddon\NintendoSDK\Compilers\NX\nx\aarch64\include\c++\v1" -I"C:\NintendoDev\NintendoSDK16.7_NXaddon\NintendoSDK\Include" -I"C:\NintendoDev\NintendoSDK16.7_NXaddon\NintendoSDK\Common\Configs\Targets\NX-NXFP2-a64\Include" -I"C:\NintendoDev\NintendoSDK16.7_NXaddon\NintendoSDK\Compilers\NX\nx\aarch64\include" "C:\Program Files\Unity 2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools\il2cpp\libil2cpp\os\SocketImpl.cpp" -o "C:\Users\USER\Documents\ssc4nx\SwitchIL2CPPCache\il2cpp_cache\globalcache\0B3E110171B0E65A218890A7384417AF.o"

at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
at il2cpp.Compilation.CompilationDriver.Run(RuntimePlatform platform, Il2CppCommandLineArguments il2CppCommandLineArguments, BuildingOptions buildingOptions, ReadOnlyCollection`1 matchedAssemblyMethodSourceFiles)
at il2cpp.Program.DoRun(String[] args, RuntimePlatform platform, Il2CppCommandLineArguments il2CppCommandLineArguments, BuildingOptions buildingOptions, Boolean throwExceptions)

at il2cpp.Program.DoRun(String[] args, RuntimePlatform platform, Il2CppCommandLineArguments il2CppCommandLineArguments, BuildingOptions buildingOptions, Boolean throwExceptions)
at UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) [0x0014b] in <76a445b462cc49e2975056a950390db7>:0
at UnityEditorInternal.Runner.RunNetCoreProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) [0x0005d] in <76a445b462cc49e2975056a950390db7>:0
at UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo) [0x000a9] in <76a445b462cc49e2975056a950390db7>:0
at UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data) [0x003c2] in <76a445b462cc49e2975056a950390db7>:0
at UnityEditorInternal.IL2CPPBuilder.Run () [0x000f4] in <76a445b462cc49e2975056a950390db7>:0
at UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) [0x0001c] in <76a445b462cc49e2975056a950390db7>:0
at UnityEditor.Switch.PostProcessSwitch.PostProcess (UnityEditor.BuildTarget target, UnityEditor.BuildOptions options, System.String installPath, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String stagingAreaDataManaged, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) [0x0047e] in C:\buildslave\unity\build\PlatformDependent\Switch\Editor\Managed\PostProcessSwitch.cs:262
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
 
Can someone with a working 14.1.0 SDK setup (with unity support) shoot me a PM? I am unable to figure some stuff out, which is most likely due to missing files in the SDK i have. Id like to get to the bottom of this without breaking any forum rules.

NVM, got 13.0.0 with all plugins working, exporting works and i made myself a neat repack script that automates everyhting.
 
Last edited by Slluxx,
  • Like
Reactions: I pwned U!
I've got the unity version 2021.2.0b11 with the switch plugin of course and i've got the NintendoSDk 16.7 but when I try to build the game I get an error about a missing file located in "NintendoSDK\Resources\SpecFiles\Application.aarch64.lp64.nmeta"
 
  • Like
Reactions: Slluxx
Can anyone help me? I'm using Unity 2021.2.0.b11 and the leak from 21.12.2022 but when I'm compiling the project I get following errors:

FIrst
UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002d8] in <76a445b462cc49e2975056a950390db7>:0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <76a445b462cc49e2975056a950390db7>:0
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Second
Build completed with a result of 'Failed' in 120 seconds (119627 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Third
Exception: Unity.IL2CPP.Building.BuilderFailedException: Build failed with 0 successful nodes and 1 failed ones
Annotation: IL2CPP_CodeGenAndCompile D:/UnityProjects/My project (1)/SwitchIL2CPPCache/il2cpp_cache/buildstate/artifacts/il2cpp_conv_kbsx.traceevents
Cmdline: "D:\UnityEditor\2021.2.0b11\Editor\Data\il2cpp\build\deploy\net5.0\il2cpp.exe" --convert-to-cpp --compile-cpp --directory="D:/UnityProjects/My project (1)/Temp/StagingArea/Managed" --data-folder="D:\UnityProjects\My project (1)\Library\Il2cppBuildCache\Switch\il2cppOutput\Data" --generatedcppdir="D:/UnityProjects/My project (1)/Library/Il2cppBuildCache/Switch/il2cppOutput" --symbols-folder="D:\UnityProjects\My project (1)\Library\Il2cppBuildCache\Switch\il2cppOutput\Symbols" --additional-cpp="D:/UnityProjects/My project (1)/Library/Il2cppBuildCache/Switch/additionalCppFiles/UnlinkedFunctions.cpp" --enable-stats --enable-array-bounds-check --code-generation-option=EnableInlining --stats-output-dir="D:/UnityProjects/My project (1)/Assets/../SwitchIL2CPPStats" --platform=Switch --architecture=ARM64 --outputpath="D:\UnityProjects\My project (1)\Library/Il2cppBuildCache/Switch\Native\SwitchPlayer.nss" --dont-deploy-baselib --verbose --libil2cpp-static --baselib-directory="D:\UnityEditor\2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Native\release" --avoid-dynamic-library-copy --additional-defines=DEBUGMODE=0 --additional-defines=UNITY_RELEASE=1 --additional-defines=IL2CPP_USE_SOCKET_MULTIPLEX_IO=1 --additional-include-directories="D:\UnityEditor\2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools/il2cpp\bdwgc/include" --additional-include-directories="D:\UnityEditor\2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools/il2cpp\libil2cpp/include" --plugin="D:/UnityEditor/2021.2.0b11/Editor/Data/PlaybackEngines/Switch/Tools\SwitchIl2CppPlugin.dll" --incremental-g-c-time-slice=3 --configuration=ReleasePlus --linker-flags-file="D:/UnityProjects/My project (1)/SwitchIL2CPPCache/il2cpp_cache/linkerflags/linkerflags.txt" --dotnetprofile=unityaot-linux --cachedirectory="D:/UnityProjects/My project (1)/Assets/../SwitchIL2CPPCache/il2cpp_cache" --profiler-report --profiler-output-file="D:/UnityProjects/My project (1)/SwitchIL2CPPCache/il2cpp_cache/buildstate/artifacts/il2cpp_conv_kbsx.traceevents"
ExitCode: 1
Stdout:
Building SwitchPlayer.nss with SwitchToolChain
Output directory: D:\UnityProjects\My project (1)\Library\Il2cppBuildCache\Switch\Native
Cache directory: D:\UnityProjects\My project (1)\SwitchIL2CPPCache\il2cpp_cache
Error: Unity.IL2CPP.Building.BuilderFailedException: In file included from D:\UnityProjects\My project (1)\Library\Il2cppBuildCache\Switch\il2cppOutput\mscorlib_CodeGen.c:1:
In file included from D:\UnityEditor\2021.2.0b11\Editor\Data\il2cpp\libil2cpp\pch\pch-c.h:3:
In file included from D:\UnityEditor\2021.2.0b11\Editor\Data\il2cpp\libil2cpp\il2cpp-config.h:3:
In file included from D:\NSDK\NintendoSDK\Compilers\NX\nx\aarch64\include\c++\v1\string.h:54:
D:\NSDK\NintendoSDK\Compilers\NX\nx\aarch64\include\c++\v1\__config(13,10): fatal error: '__config_site' file not found
#include <__config_site>
^~~~~~~~~~~~~~~
1 error generated.


Invocation was: Executable: "D:\NSDK\NintendoSDK\Compilers\NX\nx\aarch64\bin\clang.exe"
Arguments: -c -x c -std=gnu11 -MD -fexceptions -funsigned-char -ffunction-sections -fPIC -fno-common -fno-rtti -fvectorize -fno-strict-aliasing -fno-short-enums -fdiagnostics-format=msvc -mno-implicit-float -mcpu=cortex-a57+fp+simd+crypto+crc -Wall -O3 -fno-strict-overflow -fdata-sections -DDEBUGMODE=0 -DUNITY_RELEASE=1 -DIL2CPP_USE_SOCKET_MULTIPLEX_IO=1 -DNET_4_0 -DUNITY_AOT -DIL2CPP_MONO_DEBUGGER_DISABLED -DGC_NOT_DLL -DRUNTIME_IL2CPP -DIL2CPP_ENABLE_WRITE_BARRIERS=1 -DIL2CPP_INCREMENTAL_TIME_SLICE=3 -DBASELIB_INLINE_NAMESPACE=il2cpp_baselib -DIL2CPP_DEFAULT_DATA_DIR_PATH=Data -D__arm64__ -DNN_BUILD_TARGET_PLATFORM_NX -DNN_NINTENDO_SDK -DNN_SDK_BUILD_RELEASE -DNN_DISABLE_LOG -DENABLE_SCRIPTING_GC_WBARRIERS -I"D:\UnityEditor\2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools\il2cpp\bdwgc\include" -I"D:\UnityEditor\2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools\il2cpp\libil2cpp\include" -I"D:\UnityEditor\2021.2.0b11\Editor\Data\il2cpp\libil2cpp" -I"D:\UnityEditor\2021.2.0b11\Editor\Data\il2cpp\libil2cpp" -I"D:\UnityEditor\2021.2.0b11\Editor\Data\il2cpp\external\bdwgc\include" -I"D:\UnityEditor\2021.2.0b11\Editor\Data\il2cpp\external\xxHash" -I"D:\UnityEditor\2021.2.0b11\Editor\Data\il2cpp\external\baselib\Include" -I"D:\UnityEditor\2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools\il2cpp\external\baselib\Platforms\Switch\Include" -I"D:\UnityEditor\2021.2.0b11\Editor\Data\il2cpp\libil2cpp\pch" -I"D:\UnityEditor\2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools\il2cpp\libil2cpp" -I"D:\UnityEditor\2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools\il2cpp\libil2cpp\os\c-api" -I"D:\UnityEditor\2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools\il2cpp\libil2cpp\os" -I"D:\UnityEditor\2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools\il2cpp\external\bdwgc" -I"D:\UnityEditor\2021.2.0b11\Editor\Data\il2cpp\external\bdwgc\libatomic_ops\src" -I"D:\UnityProjects\My project (1)\Library\Il2cppBuildCache\Switch\il2cppOutput" -I"D:\NSDK\NintendoSDK\Compilers\NX\nx\aarch64\include" -I"D:\NSDK\NintendoSDK\Compilers\NX\nx\aarch64\include\c++\v1" -I"D:\NSDK\NintendoSDK\Include" -I"D:\NSDK\NintendoSDK\Common\Configs\Targets\NX-NXFP2-a64\Include" -I"D:\NSDK\NintendoSDK\Compilers\NX\nx\aarch64\include" "D:\UnityProjects\My project (1)\Library\Il2cppBuildCache\Switch\il2cppOutput\mscorlib_CodeGen.c" -o "D:\UnityProjects\My project (1)\SwitchIL2CPPCache\il2cpp_cache\F87F1F97466B1BB84B9EDE46C13B41B5.o"

at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
at il2cpp.Compilation.CompilationDriver.Run(RuntimePlatform platform, Il2CppCommandLineArguments il2CppCommandLineArguments, BuildingOptions buildingOptions, ReadOnlyCollection`1 matchedAssemblyMethodSourceFiles)
at il2cpp.Program.DoRun(String[] args, RuntimePlatform platform, Il2CppCommandLineArguments il2CppCommandLineArguments, BuildingOptions buildingOptions, Boolean throwExceptions)

at il2cpp.Program.DoRun(String[] args, RuntimePlatform platform, Il2CppCommandLineArguments il2CppCommandLineArguments, BuildingOptions buildingOptions, Boolean throwExceptions)
UnityEditor.Switch.PostProcessSwitch.PostProcess (UnityEditor.BuildTarget target, UnityEditor.BuildOptions options, System.String installPath, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String stagingAreaDataManaged, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/PlatformDependent/Switch/Editor/Managed/PostProcessSwitch.cs:524)
UnityEditor.Switch.SwitchBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/Switch/Editor/Managed/ExtensionModule.cs:453)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <76a445b462cc49e2975056a950390db7>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, 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 <76a445b462cc49e2975056a950390db7>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

Fourth
Unity.IL2CPP.Building.BuilderFailedException: Build failed with 0 successful nodes and 1 failed ones
Annotation: IL2CPP_CodeGenAndCompile D:/UnityProjects/My project (1)/SwitchIL2CPPCache/il2cpp_cache/buildstate/artifacts/il2cpp_conv_kbsx.traceevents
Cmdline: "D:\UnityEditor\2021.2.0b11\Editor\Data\il2cpp\build\deploy\net5.0\il2cpp.exe" --convert-to-cpp --compile-cpp --directory="D:/UnityProjects/My project (1)/Temp/StagingArea/Managed" --data-folder="D:\UnityProjects\My project (1)\Library\Il2cppBuildCache\Switch\il2cppOutput\Data" --generatedcppdir="D:/UnityProjects/My project (1)/Library/Il2cppBuildCache/Switch/il2cppOutput" --symbols-folder="D:\UnityProjects\My project (1)\Library\Il2cppBuildCache\Switch\il2cppOutput\Symbols" --additional-cpp="D:/UnityProjects/My project (1)/Library/Il2cppBuildCache/Switch/additionalCppFiles/UnlinkedFunctions.cpp" --enable-stats --enable-array-bounds-check --code-generation-option=EnableInlining --stats-output-dir="D:/UnityProjects/My project (1)/Assets/../SwitchIL2CPPStats" --platform=Switch --architecture=ARM64 --outputpath="D:\UnityProjects\My project (1)\Library/Il2cppBuildCache/Switch\Native\SwitchPlayer.nss" --dont-deploy-baselib --verbose --libil2cpp-static --baselib-directory="D:\UnityEditor\2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Native\release" --avoid-dynamic-library-copy --additional-defines=DEBUGMODE=0 --additional-defines=UNITY_RELEASE=1 --additional-defines=IL2CPP_USE_SOCKET_MULTIPLEX_IO=1 --additional-include-directories="D:\UnityEditor\2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools/il2cpp\bdwgc/include" --additional-include-directories="D:\UnityEditor\2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools/il2cpp\libil2cpp/include" --plugin="D:/UnityEditor/2021.2.0b11/Editor/Data/PlaybackEngines/Switch/Tools\SwitchIl2CppPlugin.dll" --incremental-g-c-time-slice=3 --configuration=ReleasePlus --linker-flags-file="D:/UnityProjects/My project (1)/SwitchIL2CPPCache/il2cpp_cache/linkerflags/linkerflags.txt" --dotnetprofile=unityaot-linux --cachedirectory="D:/UnityProjects/My project (1)/Assets/../SwitchIL2CPPCache/il2cpp_cache" --profiler-report --profiler-output-file="D:/UnityProjects/My project (1)/SwitchIL2CPPCache/il2cpp_cache/buildstate/artifacts/il2cpp_conv_kbsx.traceevents"
ExitCode: 1
Stdout:
Building SwitchPlayer.nss with SwitchToolChain
Output directory: D:\UnityProjects\My project (1)\Library\Il2cppBuildCache\Switch\Native
Cache directory: D:\UnityProjects\My project (1)\SwitchIL2CPPCache\il2cpp_cache
Error: Unity.IL2CPP.Building.BuilderFailedException: In file included from D:\UnityProjects\My project (1)\Library\Il2cppBuildCache\Switch\il2cppOutput\mscorlib_CodeGen.c:1:
In file included from D:\UnityEditor\2021.2.0b11\Editor\Data\il2cpp\libil2cpp\pch\pch-c.h:3:
In file included from D:\UnityEditor\2021.2.0b11\Editor\Data\il2cpp\libil2cpp\il2cpp-config.h:3:
In file included from D:\NSDK\NintendoSDK\Compilers\NX\nx\aarch64\include\c++\v1\string.h:54:
D:\NSDK\NintendoSDK\Compilers\NX\nx\aarch64\include\c++\v1\__config(13,10): fatal error: '__config_site' file not found
#include <__config_site>
^~~~~~~~~~~~~~~
1 error generated.


Invocation was: Executable: "D:\NSDK\NintendoSDK\Compilers\NX\nx\aarch64\bin\clang.exe"
Arguments: -c -x c -std=gnu11 -MD -fexceptions -funsigned-char -ffunction-sections -fPIC -fno-common -fno-rtti -fvectorize -fno-strict-aliasing -fno-short-enums -fdiagnostics-format=msvc -mno-implicit-float -mcpu=cortex-a57+fp+simd+crypto+crc -Wall -O3 -fno-strict-overflow -fdata-sections -DDEBUGMODE=0 -DUNITY_RELEASE=1 -DIL2CPP_USE_SOCKET_MULTIPLEX_IO=1 -DNET_4_0 -DUNITY_AOT -DIL2CPP_MONO_DEBUGGER_DISABLED -DGC_NOT_DLL -DRUNTIME_IL2CPP -DIL2CPP_ENABLE_WRITE_BARRIERS=1 -DIL2CPP_INCREMENTAL_TIME_SLICE=3 -DBASELIB_INLINE_NAMESPACE=il2cpp_baselib -DIL2CPP_DEFAULT_DATA_DIR_PATH=Data -D__arm64__ -DNN_BUILD_TARGET_PLATFORM_NX -DNN_NINTENDO_SDK -DNN_SDK_BUILD_RELEASE -DNN_DISABLE_LOG -DENABLE_SCRIPTING_GC_WBARRIERS -I"D:\UnityEditor\2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools\il2cpp\bdwgc\include" -I"D:\UnityEditor\2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools\il2cpp\libil2cpp\include" -I"D:\UnityEditor\2021.2.0b11\Editor\Data\il2cpp\libil2cpp" -I"D:\UnityEditor\2021.2.0b11\Editor\Data\il2cpp\libil2cpp" -I"D:\UnityEditor\2021.2.0b11\Editor\Data\il2cpp\external\bdwgc\include" -I"D:\UnityEditor\2021.2.0b11\Editor\Data\il2cpp\external\xxHash" -I"D:\UnityEditor\2021.2.0b11\Editor\Data\il2cpp\external\baselib\Include" -I"D:\UnityEditor\2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools\il2cpp\external\baselib\Platforms\Switch\Include" -I"D:\UnityEditor\2021.2.0b11\Editor\Data\il2cpp\libil2cpp\pch" -I"D:\UnityEditor\2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools\il2cpp\libil2cpp" -I"D:\UnityEditor\2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools\il2cpp\libil2cpp\os\c-api" -I"D:\UnityEditor\2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools\il2cpp\libil2cpp\os" -I"D:\UnityEditor\2021.2.0b11\Editor\Data\PlaybackEngines\Switch\Tools\il2cpp\external\bdwgc" -I"D:\UnityEditor\2021.2.0b11\Editor\Data\il2cpp\external\bdwgc\libatomic_ops\src" -I"D:\UnityProjects\My project (1)\Library\Il2cppBuildCache\Switch\il2cppOutput" -I"D:\NSDK\NintendoSDK\Compilers\NX\nx\aarch64\include" -I"D:\NSDK\NintendoSDK\Compilers\NX\nx\aarch64\include\c++\v1" -I"D:\NSDK\NintendoSDK\Include" -I"D:\NSDK\NintendoSDK\Common\Configs\Targets\NX-NXFP2-a64\Include" -I"D:\NSDK\NintendoSDK\Compilers\NX\nx\aarch64\include" "D:\UnityProjects\My project (1)\Library\Il2cppBuildCache\Switch\il2cppOutput\mscorlib_CodeGen.c" -o "D:\UnityProjects\My project (1)\SwitchIL2CPPCache\il2cpp_cache\F87F1F97466B1BB84B9EDE46C13B41B5.o"

at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
at il2cpp.Compilation.CompilationDriver.Run(RuntimePlatform platform, Il2CppCommandLineArguments il2CppCommandLineArguments, BuildingOptions buildingOptions, ReadOnlyCollection`1 matchedAssemblyMethodSourceFiles)
at il2cpp.Program.DoRun(String[] args, RuntimePlatform platform, Il2CppCommandLineArguments il2CppCommandLineArguments, BuildingOptions buildingOptions, Boolean throwExceptions)

at il2cpp.Program.DoRun(String[] args, RuntimePlatform platform, Il2CppCommandLineArguments il2CppCommandLineArguments, BuildingOptions buildingOptions, Boolean throwExceptions)
at UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) [0x0014b] in <76a445b462cc49e2975056a950390db7>:0
at UnityEditorInternal.Runner.RunNetCoreProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) [0x0005d] in <76a445b462cc49e2975056a950390db7>:0
at UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo) [0x000a9] in <76a445b462cc49e2975056a950390db7>:0
at UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data) [0x003c2] in <76a445b462cc49e2975056a950390db7>:0
at UnityEditorInternal.IL2CPPBuilder.Run () [0x000f4] in <76a445b462cc49e2975056a950390db7>:0
at UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) [0x0001c] in <76a445b462cc49e2975056a950390db7>:0
at UnityEditor.Switch.PostProcessSwitch.PostProcess (UnityEditor.BuildTarget target, UnityEditor.BuildOptions options, System.String installPath, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String stagingAreaDataManaged, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) [0x0047e] in C:\buildslave\unity\build\PlatformDependent\Switch\Editor\Managed\PostProcessSwitch.cs:262
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

EDIT: For some reason Backslash P is a smiley in gbatemp
 
I've setup Unity 2022.2.4f1 and the plugin successfully, I've also followed this guide
https://gbatemp.net/threads/how-to-create-nintendo-switch-games-with-unity.625751/ to setup the SDK but i Get this error when I try to compile the NSP.

Building Library\Bee\artifacts\AppPkg\voxg4\main.npdm failed with output:
The system cannot find the path specified.
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Build completed with a result of 'Failed' in 4 seconds (3892 ms)
Building Library\Bee\artifacts\AppPkg\voxg4\main.npdm failed with output:
The system cannot find the path specified.

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Ive successfully setup the 9.2 SDK and unity 2019 but cant work out whats going on with the newer version.

Any help would be appreciated.
 
Last edited by mcdij,
I've setup Unity 2022.2.4f1 and the plugin successfully, I've also followed this guide
https://gbatemp.net/threads/how-to-create-nintendo-switch-games-with-unity.625751/ to setup the SDK but i Get this error when I try to compile the NSP.

Building Library\Bee\artifacts\AppPkg\voxg4\main.npdm failed with output:
The system cannot find the path specified.
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Build completed with a result of 'Failed' in 4 seconds (3892 ms)
Building Library\Bee\artifacts\AppPkg\voxg4\main.npdm failed with output:
The system cannot find the path specified.

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Ive successfully setup the 9.2 SDK and unity 2019 but cant work out whats going on with the newer version.

Any help would be appreciated.
2022.2.4f1 is for 15.3.0, so you sure have SDK 15.3.2, nowhere is there referenced to a leak with SDK 15.3.0 so you need Unity plugin to compile on 15.3.2 u get version 15.3.0 for 2022.2.4f1
 
2022.2.4f1 is for 15.3.0, so you sure have SDK 15.3.2, nowhere is there referenced to a leak with SDK 15.3.0 so you need Unity plugin to compile on 15.3.2 u get version 15.3.0 for 2022.2.4f1

Damn it, there is always something lol, i have no idea how to work out the download links for the support plugins. Guess its back to the older version of unity.

Atleast I managed to get some useful documentation from the new leaks.

Thanks.
 

Site & Scene News

Popular threads in this forum