Integrating with Lyra Game

The Lyra Sample Game released by Epic Games proved to be popular among indie developers. This section will be helpful for those who want to integrate Kronos Matchmaking into the Lyra project.

Sessions in Lyra

All online features in Lyra are implemented in the Common User Plugin. This plugin was designed to be a base for other projects to use as a base when customizing Lyra. Its two main parts are the CommonUserSubsystem which handles user authentication, and the CommonSessionSubsystem which handles basic session operations such as hosting and joining online games.

Fixing the Issues

Unfortunately the Common User plugin tries to do things that Kronos also handles automatically. This results in kind of a conflicting situation where both plugins are trying to do the same thing on their own way. The best option would be to disable the Common User plugin entirely, however this isn't really an option due to the fact that it is integrated into the LyraGameMode and LyraGameInstance classes on a C++ level. So how should we go about solving this issue?

Thankfully you can pretty easily fix these issues by stopping the CommonSessionSubsystem from registering its events to the Online Subsystem.

  1. Go to your Lyra project folder.

  2. Right click on the .uproject file and select the "Generate Visual Studio Project Files" option. You must have Visual Studio installed to complete this step.

  3. Open the generated .sln file. This is the Visual Studio solution file that's been generated by Unreal Engine.

  4. Open the CommonSessionSubsystem.cpp file from the Solution Explorer. You can press Ctrl+T to quickly find files in the solution.

  5. Find the "BindOnlineDelegates" function and simply remove the "BindOnlineDelegatesOSSv1();" line. You can press Ctrl+F to find these lines.

  6. (Optional) Override the Online Session class in the LyraGameInstance class. To do this follow the steps outlined in the Configuration: Overriding the Online Session part of the documentation. This part is optional but recommended to keep everything working properly in Lyra.

  7. Now you'll need to rebuild the project. To do this simply press Ctrl+B on your keyboard, or in the top menu press Build -> Build Solution. Please note that this may take a while...

  8. If the build succeeded you can start the project and begin using Kronos Matchmaking!

Last updated