PackageInfoclass

A thin readonly view over a `Sandbox.Package`'s data values, exposing the well-known launcher flags by name so callers don't repeat the string keys and defaults. Holds nothing but a reference to the package; get one from `Sandbox.Package.Info`. Tolerates a default/empty instance by returning each flag's default.

objectPackageInfo
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public sealed struct Sandbox.PackageInfo

Properties16

Showing 16 properties

public string Sandbox.PackageInfo.DefaultMap { get; set; }PUBLICGETSET

The map this game launches with by default, or empty if none is configured.

Returns:string

public System.Collections.Generic.List`1<Sandbox.DataModel.GameSetting> Sandbox.PackageInfo.GameSettings { get; set; }PUBLICGETSET

The configurable game settings shown in the create-game modal, or null if none are defined.

Returns:List<GameSetting>

public bool Sandbox.PackageInfo.HasGameSettings { get; set; }PUBLICGETSET

Does this game define any configurable `Sandbox.DataModel.GameSetting`s?

Returns:bool

public bool Sandbox.PackageInfo.IsDedicatedServerOnly { get; set; }PUBLICGETSET

Is this game playable only on a dedicated server (`Sandbox.PackageInfo.LaunchMode` "dedicatedserveronly")?

Returns:bool

public bool Sandbox.PackageInfo.IsQuickPlay { get; set; }PUBLICGETSET

Does this game launch straight into matchmaking (`Sandbox.PackageInfo.LaunchMode` "quickplay")?

Returns:bool

public bool Sandbox.PackageInfo.IsStreamerGame { get; set; }PUBLICGETSET

Does this game opt into the streamer integration features (the stream connection button, etc.)?

Returns:bool

public bool Sandbox.PackageInfo.IsVrOnly { get; set; }PUBLICGETSET

Can this game only be played in VR?

Returns:bool

public string Sandbox.PackageInfo.LaunchMode { get; set; }PUBLICGETSET

The raw launch mode (e.g. "quickplay", "dedicatedserveronly", "launcher"), or "default".

Returns:string

public string Sandbox.PackageInfo.MapTarget { get; set; }PUBLICGETSET

The package whose maps this game pulls from, defaulting to the game's own ident.

Returns:string

public int Sandbox.PackageInfo.MaxPlayers { get; set; }PUBLICGETSET

The maximum number of players this game supports. Defaults to 1.

Returns:int

public int Sandbox.PackageInfo.MinPlayers { get; set; }PUBLICGETSET

The minimum number of players needed to start this game. Defaults to 1.

Returns:int

public bool Sandbox.PackageInfo.NeedsMap { get; set; }PUBLICGETSET

Does this game require a map to be chosen before it can launch?

Returns:bool

public string Sandbox.PackageInfo.ParentPackage { get; set; }PUBLICGETSET

The ident of this package's parent package, or null if it has none.

Returns:string

public bool Sandbox.PackageInfo.ShowsChangeMap { get; set; }PUBLICGETSET

Should the pause menu offer a "change map" button? Defaults to false.

Returns:bool

public bool Sandbox.PackageInfo.ShowsPlayerList { get; set; }PUBLICGETSET

Should the pause menu show the player list button? Defaults to true.

Returns:bool

public bool Sandbox.PackageInfo.UsesCreateGameModal { get; set; }PUBLICGETSET

Should launching this game go through the create-game modal rather than starting directly?

Returns:bool

On this page