Skip to content

Latest commit

 

History

History
86 lines (64 loc) · 3.26 KB

PrepareThirdParty.md

File metadata and controls

86 lines (64 loc) · 3.26 KB

Prepare UnrealSharp ThirdParty

You have two methods to obtain UnrealSharp’s dependency packages:

  1. Download the precompiled .NET 8.0 runtime binary package:
    From GoogleDrive
    From BaiduDisk
  2. Build it by yourself
    Although the design of UnrealSharp does not mandate the use of .NET's underlying runtime type, it currently only implements a Mono-based Runtime, so the mono runtime must be selected when compiling .net. Runtime based on CoreCLR will be provided in subsequent development

Build

Related Links

.NET runtime build workflow
Building Mono

clone .NET runtime source code(UnrealSharp fork)

To build a complete runtime environment, you need to build both the Mono runtime and libraries. At the repo root, simply execute:

./build.sh mono+libs

or on Windows,

build.cmd mono+libs

Note that the debug configuration is the default option. It generates a 'debug' output and that includes asserts, fewer code optimizations, and is easier for debugging. If you want to make performance measurements, or just want tests to execute more quickly, you can also build the 'release' version which does not have these checks by adding the flag -configuration release (or -c release).
If you want to compile libraries for other architectures on the current platform, you can use the command line -a:

./build.sh mono+libs -a arm64 -c release

You can use -help to see the full list of supported commands:

./build.sh -help

Copy Packages to UnrealSharp

After compilation is completed, you will see the directory artifacts/bin in the runtime source code root directory. There will be two directories in this directory, mono and runtime, which UnrealSharp depends on.

  • runtime
    • artifacts
      • bin
        • mono
          • ios.arm64.Debug
          • ios.arm64.Release
          • osx.arm64.Debug
          • osx.arm64.Release
          • osx.x64.Debug
          • osx.x64.Release
          • windows.x64.Debug
          • ...
        • runtime
          • net8.0-ios-Debug-arm64
          • net8.0-ios-Release-arm64
          • net8.0-osx-Debug-arm64
          • ...

The specific subfolders depend on your compilation platform and compilation configuration.
Copy the entire mono and runtime directories to the Plugins/UnrealSharp/ThirdParty directory in the root directory of your Unreal project.
Your final directory should look like this:

  • Your Unreal Project
    • Plugins
      • UnrealSharp
        • ThirdParty
          • mono
            • windows.x64.Debug
            • ...
          • runtime
            • net8.0-windows-Debug-x64
            • ...
    • GameScripts
    • Managed