From e1443931667932617bcfef753c8acdb0247c413c Mon Sep 17 00:00:00 2001 From: Oscar Olsson <101010793+OlssonDev@users.noreply.github.com> Date: Sun, 15 Sep 2024 12:32:41 +0200 Subject: [PATCH] Updated packaging guide --- packaging.md | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/packaging.md b/packaging.md index cbbcf19..ca15d2d 100644 --- a/packaging.md +++ b/packaging.md @@ -10,14 +10,31 @@ layout: default Begin by packaging your game as you would normally in Unreal Engine. Ensure you select the correct platform (Windows) and configurations for your game. This initial step does not differ from the standard game packaging procedure in Unreal Engine. -## Run the UnrealSharp Packaging Script +## Packaging via Unreal Editor -After packaging your game, you will need to execute a script to include the C# code and the .NET runtime into your packaged game. +You can easily package your C# project and runtime directly through the Unreal Editor. Follow these steps: + +### Open the Packaging Tool + +In the editor, navigate to the **UnrealSharp** toolbar located at the top of the viewport, and click on **Package Project**. + +![PackageProject](https://raw.githubusercontent.com/UnrealSharp/unrealsharp.github.io/main/media/get-started/PackageProject.PNG) + +A file explorer dialog will appear, prompting you to choose the directory where your project will be packaged. Select the **root folder** of your packaged project. This is the folder containing your **.exe** file. + +After selecting the correct folder, you should see the packaging process start. + +![PackagingProcess](https://raw.githubusercontent.com/UnrealSharp/unrealsharp.github.io/main/media/get-started/PackagingProjectPrompt.PNG) + +Once the prompt disappears, the packaging is complete, and your game is ready to be launched. + +## Packaging via Command Prompt Open **Command Prompt** or **PowerShell** window and navigate to ```UnrealSharp\Binaries\Managed``` -## Publish Script -```dotnet UnrealSharpBuildTool.dll --Action Publish --ProjectDirectory "" --ProjectName "" --PluginDirectory "" --ArchiveDirectory ""``` +## Package Project Script + +```dotnet UnrealSharpBuildTool.dll --Action PackageProject --ProjectDirectory "" --ProjectName "" --PluginDirectory "" --ArchiveDirectory "" --AdditionalArgs BuildConfig=Release``` **--Action:** The action you want UnrealSharpBuildTool to run. @@ -32,7 +49,7 @@ Open **Command Prompt** or **PowerShell** window and navigate to ```UnrealSharp\ ### Example Usage: If your project is named "MyGame" and is located at ```C:/Users/CoolName/Documents/Unreal Projects/MyGame```, with the UnrealSharp plugin in the project's "Plugins" folder and you want to archive the packaged game to the desktop, your command would look like this: -```dotnet UnrealSharpBuildTool.dll --Action Publish --ProjectDirectory "C:/Users/CoolName/Documents/Unreal Projects/MyGame/" --ProjectName "MyGame" --PluginDirectory "C:/Users/CoolName/Documents/Unreal Projects/MyGame/Plugins/UnrealSharp" --ArchiveDirectory "C:/Users/CoolName/Desktop/Windows"``` +```dotnet UnrealSharpBuildTool.dll --Action PackageProject --ProjectDirectory "C:/Users/CoolName/Documents/Unreal Projects/MyGame/" --ProjectName "MyGame" --PluginDirectory "C:/Users/CoolName/Documents/Unreal Projects/MyGame/Plugins/UnrealSharp" --ArchiveDirectory "C:/Users/CoolName/Desktop/Windows" --AdditionalArgs BuildConfig=Release``` ## Done and dusted!