API ReferenceSandbox.Services

PackageTypeclass

A package type/category (e.g. "game", "model", "addon"), along with its allowed licenses and counts. The list is fetched once per session via `Sandbox.Services.PackageType.LoadAsync` — typically on startup — and then accessed synchronously via `Sandbox.Services.PackageType.All` and `Sandbox.Services.PackageType.Get(System.String)`.

objectPackageType
Namespace
Sandbox.Services
Assembly
Sandbox.Engine
Declaration
public sealed class Sandbox.Services.PackageType

Constructors1

Showing 1 constructors

Methods1

Showing 1 methods

public static Sandbox.Services.PackageType Get(string name)PUBLICSTATIC

Find a package type by its `Sandbox.Services.PackageType.Name`. Returns null if not found, or if `Sandbox.Services.PackageType.LoadAsync` hasn't been called yet.

ParameterTypeDescription
namestring
Returns:PackageType

Properties20

Showing 20 properties

public static System.Collections.Generic.IReadOnlyList`1<Sandbox.Services.PackageType> Sandbox.Services.PackageType.All { get; set; }PUBLICSTATICGETSET

All known package types. Empty until `Sandbox.Services.PackageType.LoadAsync` has completed.

Returns:IReadOnlyList<PackageType>

public System.Collections.Generic.IReadOnlyList`1<Sandbox.Services.PackageLicense> Sandbox.Services.PackageType.AssetLicenses { get; set; }PUBLICGETSET

Licenses applicable to assets within packages of this type.

Returns:IReadOnlyList<PackageLicense>

public int Sandbox.Services.PackageType.Count { get; set; }PUBLICGETSET

Number of packages of this type that are visible.

Returns:int

public bool Sandbox.Services.PackageType.HasServices { get; set; }PUBLICGETSET

Whether packages of this type can offer backend services.

Returns:bool

public string Sandbox.Services.PackageType.Icon { get; set; }PUBLICGETSET

Icon for this type.

Returns:string

public string Sandbox.Services.PackageType.Name { get; set; }PUBLICGETSET

Internal name of the type (e.g. "game", "model").

Returns:string

public bool Sandbox.Services.PackageType.ShowOnIndex { get; set; }PUBLICGETSET

Whether this type is shown on the index page.

Returns:bool

public System.Collections.Generic.IReadOnlyList`1<Sandbox.Services.PackageLicense> Sandbox.Services.PackageType.SoftwareLicenses { get; set; }PUBLICGETSET

Licenses applicable to the package itself when it's software.

Returns:IReadOnlyList<PackageLicense>

public string Sandbox.Services.PackageType.Title { get; set; }PUBLICGETSET

Display title of the type.

Returns:string

public int Sandbox.Services.PackageType.TotalCount { get; set; }PUBLICGETSET

Total number of packages of this type, including hidden/archived.

Returns:int

On this page

Constructorspublic PackageType()Methodspublic static Sandbox.Services.PackageType Get(System.String name)Propertiespublic static Sandbox.Services.PackageType Sandbox.Services.PackageType.Addon { get; set; }public static System.Collections.Generic.IReadOnlyList`1<Sandbox.Services.PackageType> Sandbox.Services.PackageType.All { get; set; }public System.Collections.Generic.IReadOnlyList`1<Sandbox.Services.PackageLicense> Sandbox.Services.PackageType.AssetLicenses { get; set; }public static Sandbox.Services.PackageType Sandbox.Services.PackageType.Clothing { get; set; }public static Sandbox.Services.PackageType Sandbox.Services.PackageType.Collection { get; set; }public System.Int32 Sandbox.Services.PackageType.Count { get; set; }public static Sandbox.Services.PackageType Sandbox.Services.PackageType.Game { get; set; }public System.Boolean Sandbox.Services.PackageType.HasServices { get; set; }public System.String Sandbox.Services.PackageType.Icon { get; set; }public static Sandbox.Services.PackageType Sandbox.Services.PackageType.Library { get; set; }public static Sandbox.Services.PackageType Sandbox.Services.PackageType.Map { get; set; }public static Sandbox.Services.PackageType Sandbox.Services.PackageType.Material { get; set; }public static Sandbox.Services.PackageType Sandbox.Services.PackageType.Model { get; set; }public System.String Sandbox.Services.PackageType.Name { get; set; }public static Sandbox.Services.PackageType Sandbox.Services.PackageType.Prefab { get; set; }public System.Boolean Sandbox.Services.PackageType.ShowOnIndex { get; set; }public System.Collections.Generic.IReadOnlyList`1<Sandbox.Services.PackageLicense> Sandbox.Services.PackageType.SoftwareLicenses { get; set; }public static Sandbox.Services.PackageType Sandbox.Services.PackageType.Sound { get; set; }public System.String Sandbox.Services.PackageType.Title { get; set; }public System.Int32 Sandbox.Services.PackageType.TotalCount { get; set; }Metadata