Packaging
On this page
Distributing (Packaging) Prysm games
Unreal Engine currently doesn’t build plugins in Blueprint-only projects, therefore you can’t use Prysm (or any other runtime plugin) without any C++ code. You can fix this by adding a simple dummy C++ class to your project, which is described in the next paragraph. If your game already has C++ code, skip the next section.
Fix for Blueprint-only games
- Open the UE Editor and go to File -> Add Code to Project.
- Select empty class.
- Click Next until you’re asked Would you like to edit the code now?. Click yes. (Or click no and open the solution in Visual Studio manually)
- Build the solution from Visual Studio (CTRL + SHIFT + B). Don’t worry if you get a linker error for UE4Editor-CohtmlPlugin.dll. This is caused if your Editor is still running while building.
Required steps for distribution
- Make sure your uiresources directory is located in YourGameDir/Content.
- Go to File -> Package Project -> Packaging settings and expand the Packaging options.
- Add uiresources under Additional Non-Asset Directories to Package.
- Package your game from the Editor.
- Copy the Cohtml and Renoir binaries for your platform. This step should have been automatically done by the plugin, but is listed here for completeness.
Copy the directories:
- For an Engine Plugin installation:
- YourUnrealEngineDir/Engine/Binaries/ThirdParty/Cohtml/YourPlatform
- YourUnrealEngineDir/Engine/Binaries/ThirdParty/Renoir/YourPlatform
- For a Game Plugin installation:
- YourGameDir/Plugins/Runtime/Coherent/CohtmlPlugin/Binaries/Cohtml/YourPlatform
- YourGameDir/Plugins/Runtime/Coherent/CoherentRenderingPlugin/Binaries/Renoir/YourPlatform
To:
- For an Engine Plugin installation:
- YourPackageDir/WindowsNoEditor/Engine/Binaries/ThirdParty/Cohtml/YourPlatform
- YourPackageDir/WindowsNoEditor/Engine/Binaries/ThirdParty/Renoir/YourPlatform
- For a Game Plugin installation:
- YourPackageDir/WindowsNoEditor/YourGameDir/Plugins/Runtime/Coherent/CohtmlPlugin/Binaries/Cohtml/YourPlatform
- YourPackageDir/WindowsNoEditor/YourGameDir/Plugins/Runtime/Coherent/CoherentRenderingPlugin/Binaries/Renoir/YourPlatform
If you are still using that behavior, you are required to manually copy the uiresources directory to YourPackageDir/WindowsNoEditor/YourGameDir, next to the Content and Binary directories.
Your package directory structure should resemble this:
- For an Engine Plugin installation:
|-YourPackageDir
|-WindowsNoEditor
|-Engine
|-Build
|-Binaries
|-ThirdParty
|-Cohtml
|-Win64
|-cohtml.WindowsDesktop.dll
|-...
|-Renoir
|-Win64
|-RenoirCore.WindowsDesktop.dll
|-RenoirCore.WindowsDesktop.pdb
|-YourGameDir
|-Saved
|-Content
|-UIResources
|-Binaries
|-Win64
|-YourGame.exe
|-<any_other_platform>
|-YourGame.exe
- For a Game Plugin installation:
|-YourPackageDir
|-WindowsNoEditor
|-YourGameDir
|-Engine
|-Saved
|-Content
|-uiresources
|-Binaries
|-Win64
|-YourGame.exe
|-<any_other_platform>
|-YourGame.exe
|Plugins
|-Runtime
|-Coherent
|-CohtmlPlugin
|-Binaries
|-Cohtml
|-Win64
|-cohtml.WindowsDesktop.dll
|-...
|-CoherentRenderingPlugin
|-Binaries
|-Renoir
|-Win64
|-RenoirCore.WindowsDesktop.dll
|-RenoirCore.WindowsDesktop.pdb
Optional steps
You may want to automatically load a certain set of fonts (instead of using the CSS property @font-face
). You can do so by adding them in the folder YourGameDir/Content/Fonts. Please note that Prysm requires the raw .ttf
and .otf
files and not the .uasset
files that Unreal generates, which also means that in order to distribute them, you’ll need to add the Fonts directory under Additional Non-Asset Directories to Package, just as we did above for the uiresources directory.