Skip to content

GameInfo class ​

Namespace Lustral · Assembly Lustral.Api

Information about the running game, as reported by the game itself. Lustral reads it from the game's files before any mod loads.

csharp
public sealed class GameInfo

Properties ​

Backend ​

csharp
public ScriptingBackend Backend { get; }

The game's scripting backend.

Developer ​

csharp
public string? Developer { get; }

The game's developer (Application.companyName), or null if not set.

Directory ​

csharp
public string Directory { get; }

The absolute path of the game's folder, which contains its executable.

Name ​

csharp
public string Name { get; }

The game's name (Application.productName), for example Lethal Company.

UnityVersion ​

csharp
public string? UnityVersion { get; }

The Unity version the game was built with, for example 2022.3.62f2, or null if unknown.

Version ​

csharp
public string? Version { get; }

The game's version (Application.version), for example 1.2.0. Some games display a different version to players. Null if Lustral cannot read the version from the game's files, which can occur with Unity versions newer than Lustral supports; the version is then read once the game is running (by Mod.OnGameReady) and stored for subsequent launches.

Methods ​

ToString() ​

csharp
public override string ToString();

Returns a description such as Lethal Company 0.1 (Unity 2022.3.62f2, Mono).

Mods are third-party software. Lustral does not verify their behavior and is not responsible for any damage they cause.