Skip to content

Tutorials ‐ Using the unity profiler

Will Corby edited this page Aug 13, 2024 · 4 revisions
  1. Create or open any Unity 2019.4.39f1 project
  2. Create a PC build with Development Build, Autoconnect Profiler, and Deep Profiling Support turned on
  3. Copy UnityPlayer.dll and WinPixEventRuntime.dll from your build folder into the Outer Wilds folder
  4. Copy boot.config from your whatever_Data folder into OuterWilds_Data
  5. In editor, open the profiler (Window > Analysis > Profiler, or the keyboard shortcut Ctrl + 7). When you start the game, the profiler should automatically connect

Notes

  • Having Deep Profile enabled will reduce performance but show all scripts timings rather than just some of them
  • If you replaced mono-2.0-bdwgc.dll to get line numbers, you'll have to undo that (by replacing it with the original or verifying game files if you don't have the original) or else your game will not launch
  • To reconnect after closing the Unity Editor, you'll need to manually select your player in the Profiler. On the top left of the Profiler, to the right of the Profiler Modules drop-down, is another drop-down for the source. When your game is running, you should have Play Mode, Editor Mode, and a third source that is your game, which you'll want to select. If it's not there, you have to rebuild and copy boot.config into your game files.
  • If the GPU Usage profiler module doesn't work, you may have to go into boot.config and change gfx-enable-gfx-jobs and gfx-enable-native-gfx-jobs to 0

This will also work for other games. Just make sure to match the Unity versions and Target Platform. Also, I don't think 32-bit builds have WinPixEventRuntime.dll. For IL2CPP games, you'll need to make sure to install the IL2CPP build support for the Unity version and your OS platform in the Unity Hub, as well as the Desktop Development with C++ module installed for Visual Studio. You'll also need to make sure to select IL2CPP as the Scripting Backend in the Unity Player Settings.