Packaging

Distributing (Packaging) Gameface games

Unreal Engine currently doesn’t build plugins in Blueprint-only projects, therefore you can’t use Gameface (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

  1. Open the UE Editor and go to File -> Add Code to Project.
  2. Select empty class.
  3. 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)
  4. 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

  1. Make sure your uiresources directory is located in YourGameDir/Content.
  2. Go to File -> Package Project -> Packaging settings and expand the Packaging options.
  3. Add uiresources under Additional Non-Asset Directories to Package.
  4. Package your game from the Editor.
  5. 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 Gameface 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.