Skip to content

Latest commit

 

History

History
 
 

GameLib.Plugin.Epic

GameLib.NET Epic Games Plugin for GameLib.NET

Epic Games plugin for GameLib.NET GameLib.NET.

The plugin will deliver information about the installation status of the Epic Games launcher as well the installed games within the launcher.

Installing

The plugin is already bundled with the core library GameLib.NET GameLib.NET

Additional information the plugin is providing

To get the additonal information this plugin is providing just cast IGame to EpicGame.

using GameLib;
using GameLib.Plugin.Epic;
using GameLib.Plugin.Epic.Model;

var launcherManager = new LauncherManager();

// not required to cast here just to add to the documentation
var launcher = (EpicLauncher?)launcherManager.GetLaunchers()
    .Where(launcher => launcher.Name == "Epic Games")
    // Plugin ID could also be used instead of the name
    //.Where(launcher => launcher.Id == new Guid("282B9BB6-54CA-4293-83CF-6F1134CDEEC6"))
    .FirstOrDefault();

if (launcher is not null)
{
    var games = (IEnumerable<EpicGame>)launcher.Games;
    foreach (var game in games)
    {
        // Write additional data Epic Games is providing for a game besides from the IGame interface
        Console.WriteLine($"\nGame");
        Console.WriteLine($"\tInstallSize: {game.InstallSize}");
        Console.WriteLine($"\tVersion: {game.Version}");
    }
}