Hello,
I have been using raytracing features in my scene for reflections and ambient occlusion.
It works very well in the editor, but when I make a build, the effects dont show.
Can anyone help me with this problem? Do I have to activate something special for making a build work with Raytracing?
If it’s working in editor, you shouldn’t have too activate anything more for it to show in build
Which Unity engine and HDRP version are you using ?
Did you try making a development build to see if there’s any errors showing that would prevent RTX effects from displaying ?
1 Like
Thanks for your reply.
Yes I tried to make a Dev build. I can’t seem to find a log file in the application folder. It should be in the data folder of the build app right?
If there’s some errors on your project, you will be able to see them on the console directly on screen on your build.
If there’s nothing, could you send a small repro on your issue or create a bug report so I can take a look at it ?
On Windows 10 Unity 2020.1.2f1
My steps to recreate this:
Start New HDR Project
Go to Window → Render PipeLine → hd render pipeline wizard → fix all issues for HDRP + DXR
Create a new scene
Add some objects
Add ambient occlusion, SSR and Global Illumsation to DXR Settings Volume (with Ray Tracing Preview Enabled per effect)
Save scene and build scene
Attached you see a screenshot from within the editor and one of the build.
I use a GTX 2070 Super.
1 Like
I just tried your steps with 2020.1.2f1 and the only way I managed to NOT have RTX effects in player is if I left my architecture to x86.
Using x86_64 solves this problem on my side
Do you build in x86 by any chance ?
Thank you for checking, than thats probably it!
When I try to build with x86_64 I get several errors.
Its probably something with the Windows SDK, im gonna check.
Failed running C:\Program Files\Unity\Hub\Editor\2020.1.2f1\Editor\Data\il2cpp/build/deploy/netcoreapp3.0/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="WindowsDesktop" --architecture="x64" --configuration="Release" --outputpath="C:\Users\Gebruiker\Desktop\Parabool\Temp/StagingArea/Data\Native\GameAssembly.dll" --cachedirectory="C:\Users\Gebruiker\Desktop\Parabool\Assets\..\Library/il2cpp_cache" --baselib-directory="C:/Program Files/Unity/Hub/Editor/2020.1.2f1/Editor/Data/PlaybackEngines/WindowsStandaloneSupport\Variations\win64_nondevelopment_il2cpp" --avoid-dynamic-library-copy --profiler-report --map-file-parser="C:/Program Files/Unity/Hub/Editor/2020.1.2f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --directory=C:/Users/Gebruiker/Desktop/Parabool/Temp/StagingArea/Data/Managed --generatedcppdir=C:/Users/Gebruiker/Desktop/Parabool/Temp/StagingArea/Data/il2cppOutput
stdout:
Running il2cpp.exe in server GC mode.
Building GameAssembly.dll with MsvcDesktopToolChain
Msvc Install Version: 15.0
Msvc Install SDK Directory: C:\Program Files (x86)\Windows Kits\10
Msvc Linker Path: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX64\x64\link.exe
Msvc Compiler Path: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX64\x64\cl.exe
Output directory: C:\Users\Gebruiker\Desktop\Parabool\Temp\StagingArea\Data\Native
Cache directory: C:\Users\Gebruiker\Desktop\Parabool\Library\il2cpp_cache
ObjectFiles: 247 of which compiled: 247
Time Compile: 35749 milliseconds Unity.RenderPipelines.HighDefinition.Runtime3.cpp
Time Compile: 25486 milliseconds System2.cpp
Time Compile: 21833 milliseconds mscorlib5.cpp
Time Compile: 13135 milliseconds System.Xml4.cpp
Time Compile: 9872 milliseconds Unity.RenderPipelines.HighDefinition.Runtime6.cpp
Time Compile: 7738 milliseconds UModelerCommon.cpp
Time Compile: 7560 milliseconds mscorlib6.cpp
Time Compile: 7428 milliseconds System.Xml3.cpp
Time Compile: 7400 milliseconds mscorlib11.cpp
Time Compile: 7358 milliseconds mscorlib17.cpp
Total compilation time: 45083 milliseconds.
il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX64\x64\link.exe /out:"C:\Users\Gebruiker\Desktop\Parabool\Library\il2cpp_cache\linkresult_90AD456A85A37A9DCCAA6406BBE3D009\GameAssembly.dll" /ignore:4206 /DEBUG /INCREMENTAL:NO /LARGEADDRESSAWARE /NXCOMPAT /DYNAMICBASE /NOLOGO /TLBID:1 /OPT:REF /OPT:ICF /HIGHENTROPYVA /DLL /IGNORE:4104 /NODEFAULTLIB:uuid.lib "kernel32.lib" "user32.lib" "advapi32.lib" "ole32.lib" "oleaut32.lib" "Shell32.lib" "Crypt32.lib" "psapi.lib" "version.lib" "MsWSock.lib" "ws2_32.lib" "Iphlpapi.lib" "Dbghelp.lib" "C:\Program Files\Unity\Hub\Editor\2020.1.2f1\Editor\Data\PlaybackEngines\WindowsStandaloneSupport\Variations\win64_nondevelopment_il2cpp\baselib.dll.lib" /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\lib\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\ucrt\x64" /SUBSYSTEM:WINDOWS @"C:\Users\Gebruiker\AppData\Local\Temp\tmp16E2.tmp"
LINK : fatal error LNK1181: cannot open input file 'Shell32.lib'
at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
at il2cpp.Compilation.CompilationDriver.Run(RuntimePlatform platform, BuildingOptions buildingOptions)
at il2cpp.Program.DoRun(String[] args, RuntimePlatform platform, BuildingOptions buildingOptions)
at il2cpp.Program.Run(String[] args, Boolean setInvariantCulture)
at il2cpp.Program.Main(String[] args)
stderr:
Unhandled exception. Unity.IL2CPP.Building.BuilderFailedException: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX64\x64\link.exe /out:"C:\Users\Gebruiker\Desktop\Parabool\Library\il2cpp_cache\linkresult_90AD456A85A37A9DCCAA6406BBE3D009\GameAssembly.dll" /ignore:4206 /DEBUG /INCREMENTAL:NO /LARGEADDRESSAWARE /NXCOMPAT /DYNAMICBASE /NOLOGO /TLBID:1 /OPT:REF /OPT:ICF /HIGHENTROPYVA /DLL /IGNORE:4104 /NODEFAULTLIB:uuid.lib "kernel32.lib" "user32.lib" "advapi32.lib" "ole32.lib" "oleaut32.lib" "Shell32.lib" "Crypt32.lib" "psapi.lib" "version.lib" "MsWSock.lib" "ws2_32.lib" "Iphlpapi.lib" "Dbghelp.lib" "C:\Program Files\Unity\Hub\Editor\2020.1.2f1\Editor\Data\PlaybackEngines\WindowsStandaloneSupport\Variations\win64_nondevelopment_il2cpp\baselib.dll.lib" /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\lib\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\ucrt\x64" /SUBSYSTEM:WINDOWS @"C:\Users\Gebruiker\AppData\Local\Temp\tmp16E2.tmp"
LINK : fatal error LNK1181: cannot open input file 'Shell32.lib'
at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
at il2cpp.Compilation.CompilationDriver.Run(RuntimePlatform platform, BuildingOptions buildingOptions)
at il2cpp.Program.DoRun(String[] args, RuntimePlatform platform, BuildingOptions buildingOptions)
at il2cpp.Program.Run(String[] args, Boolean setInvariantCulture)
at il2cpp.Program.Main(String[] args)
UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase)
UnityEditorInternal.Runner:RunNetCoreProgram(String, String, String, CompilerOutputParserBase, Action`1)
UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String)
UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(Il2CppBuildPipelineData, String, String, Boolean)
UnityEditorInternal.IL2CPPBuilder:Run()
UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry)
DesktopStandalonePostProcessor:SetupStagingArea(BuildPostProcessArgs, HashSet`1)
DesktopStandalonePostProcessor:PostProcess(BuildPostProcessArgs)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
I’ll double check if we don’t have any issue with IL2CPP on this version but as a workaround, you can try to build a player with mono, see if that helps.
I’ll make sure the 64 bits thingy is mentioned in the documentation.
@chap-unity thank you very much, it’s now working fine! It only works with x86_64, you are right.
1 Like
chap-unity:
I’ll double check if we don’t have any issue with IL2CPP on this version but as a workaround, you can try to build a player with mono, see if that helps.
I’ll make sure the 64 bits thingy is mentioned in the documentation.
I think there something weird, because I installed IL2CPP with unityhub together with the 2020 install of Unity.
I removed the Windows SDK from my computer and installed it again from the windows website.
It now works fine.
chap-unity:
I’ll double check if we don’t have any issue with IL2CPP on this version but as a workaround, you can try to build a player with mono, see if that helps.
I’ll make sure the 64 bits thingy is mentioned in the documentation.
@chap-unity Things still not in the documentation
Hey @RadonRaph , what we did for this one is divided in two :
Thoses two things are in the next 10.1 HDRP package that should be out in the next few days.
2 Likes