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)`.
Constructors1
Showing 1 constructors
public PackageType()
No results match this filter.
Methods1
Showing 1 methods
public static Sandbox.Services.PackageType Get(string name)
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.
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
No results match this filter.
Properties20
Showing 20 properties
public 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; }
All known package types. Empty until `Sandbox.Services.PackageType.LoadAsync` has completed.
public System.Collections.Generic.IReadOnlyList`1<Sandbox.Services.PackageLicense> Sandbox.Services.PackageType.AssetLicenses { get; set; }
Licenses applicable to assets within packages of this type.
IReadOnlyList<PackageLicense>—public static Sandbox.Services.PackageType Sandbox.Services.PackageType.Clothing { get; set; }
public static Sandbox.Services.PackageType Sandbox.Services.PackageType.Collection { get; set; }
public int Sandbox.Services.PackageType.Count { get; set; }
Number of packages of this type that are visible.
int—public static Sandbox.Services.PackageType Sandbox.Services.PackageType.Game { get; set; }
public bool Sandbox.Services.PackageType.HasServices { get; set; }
Whether packages of this type can offer backend services.
bool—public string Sandbox.Services.PackageType.Icon { get; set; }
Icon for this type.
string—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 string Sandbox.Services.PackageType.Name { get; set; }
Internal name of the type (e.g. "game", "model").
string—public static Sandbox.Services.PackageType Sandbox.Services.PackageType.Prefab { get; set; }
public bool Sandbox.Services.PackageType.ShowOnIndex { get; set; }
Whether this type is shown on the index page.
bool—public System.Collections.Generic.IReadOnlyList`1<Sandbox.Services.PackageLicense> Sandbox.Services.PackageType.SoftwareLicenses { get; set; }
Licenses applicable to the package itself when it's software.
IReadOnlyList<PackageLicense>—public static Sandbox.Services.PackageType Sandbox.Services.PackageType.Sound { get; set; }
public string Sandbox.Services.PackageType.Title { get; set; }
Display title of the type.
string—public int Sandbox.Services.PackageType.TotalCount { get; set; }
Total number of packages of this type, including hidden/archived.
int—No results match this filter.