Packageclass
Represents an asset on Asset Party.
Constructors1
Showing 1 constructors
public Package()
No results match this filter.
Methods21
Showing 21 methods
public static System.Threading.Tasks.Task`1<Sandbox.Package> Fetch(string identString, bool partial)
Find package information
| Parameter | Type | Description |
|---|---|---|
| identString | string | — |
| partial | bool | — |
public static System.Threading.Tasks.Task`1<System.Collections.Generic.List`1<Sandbox.Package.IRevision>> FetchVersions(string identString, System.Threading.CancellationToken token = null)
Get package version list
| Parameter | Type | Description |
|---|---|---|
| identString | string | — |
| token = null | CancellationToken | — |
public static System.Threading.Tasks.Task`1<Sandbox.Package.FindResult> FindAsync(string query, int take = 200, int skip = 0, System.Threading.CancellationToken token = null)
Retrieve a list of packages
| Parameter | Type | Description |
|---|---|---|
| query | string | — |
| take = 200 | int | — |
| skip = 0 | int | — |
| token = null | CancellationToken | — |
public static string FormatIdent(string org, string package, System.Nullable`1<int> version = null, bool local = False)
| Parameter | Type | Description |
|---|---|---|
| org | string | — |
| package | string | — |
| version = null | Nullable<int> | — |
| local = False | bool | — |
string—public System.Threading.Tasks.ValueTask`1<Sandbox.AchievementCollection> GetAchievements()
Get a list of achievements
public static string GetCachedTitle(string ident)
If we have this package information, try to get its name
| Parameter | Type | Description |
|---|---|---|
| ident | string | — |
string—public System.Threading.Tasks.Task`1<System.Collections.Immutable.ImmutableArray`1<Sandbox.Package.ChangeList>> GetChangeListsAsync(int page = 1)
Fetch the full, paged changelist history for this package - the in-game "what's new" notes, with each entry grouped by category. Returns a single page; call again with an incremented `page` for older entries. Returns empty if the backend is unavailable or the request fails.
| Parameter | Type | Description |
|---|---|---|
| page = 1 | int | — |
public virtual T GetMeta(string keyName, T defaultValue = null)
Get metadata value from this package for given key. This will be specific to each `Sandbox.Package.Type`.
| Parameter | Type | Description |
|---|---|---|
| keyName | string | The name of the key to look up. |
| defaultValue = null | T | Default value to return when requested key was not present in the package's metadata. |
T—public virtual T GetValue(string name, T defaultValue = null)
Get a data value. These are usually set on the backend, and are package type specific. These are generally values that are used to configure behaviour in the menu system.
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
| defaultValue = null | T | — |
T—public bool IsMounted()
Check if the package is installed and mounted
bool—public static System.Threading.Tasks.Task`1<Sandbox.Package.ListResult> ListAsync(string id, System.Threading.CancellationToken token = null)
Retrieve a list of packages, organised into groups, for discovery
| Parameter | Type | Description |
|---|---|---|
| id | string | — |
| token = null | CancellationToken | — |
public static bool TryGetCached(string identString, Sandbox.Package package, bool allowPartial = True)
Find package information
| Parameter | Type | Description |
|---|---|---|
| identString | string | — |
| package | Package | — |
| allowPartial = True | bool | — |
bool—public static bool TryParseIdent(string ident, System.ValueTuple`4<string,string,System.Nullable`1<int>,bool> parsed)
| Parameter | Type | Description |
|---|---|---|
| ident | string | — |
| parsed | ValueTuple<string,string,Nullable<int>,bool> | — |
bool—No results match this filter.
Properties46
Showing 46 properties
public int Sandbox.Package.ApiVersion { get; set; }
For game extension compatibility. Game targeting extensions are only compatible with that game if the API Versions match.
int—public bool Sandbox.Package.Archived { get; set; }
Whether this package is archived or not.
bool—public string Sandbox.Package.AssetLicense { get; set; }
The license covering this package's art/content assets, identified by name (e.g. "CC0", "CC_BY"). Null when no license is specified. Matches `PackageLicense.Name` in the license catalog, so it can be used to look up the full license details.
string—public bool Sandbox.Package.CanEdit { get; set; }
True if we're a member of this package's organization.
bool—public int Sandbox.Package.Collections { get; set; }
How many collections we're in (roughly)
int—public System.DateTimeOffset Sandbox.Package.Created { get; set; }
When the package was originally created.
DateTimeOffset—public string Sandbox.Package.Description { get; set; }
Full description of the package.
string—public string[] Sandbox.Package.EditorReferences { get; set; }
List of packages that this package depended on during editing.
string[]—public int Sandbox.Package.EngineVersion { get; set; }
Engine version this package was uploaded with. This is useful for when the base game undergoes large API changes.
int—public float Sandbox.Package.ErrorRate { get; set; }
What fraction of users got errors from this package in the last day
float—public int Sandbox.Package.Favourited { get; set; }
Number of players who added this package to their favourites.
int—public float Sandbox.Package.FileSize { get; set; }
The total size of this package in MB. This only applies to packages from Asset Party, the total file size of local packages are not calculated.
float—public System.Collections.Immutable.ImmutableArray`1<Sandbox.Package.PackageFlair> Sandbox.Package.Flair { get; set; }
Small icon badges shown over the package's thumbnail - workshop-approved, updated-since-you-played, favourited, contest-winner, etc. Computed on the backend when the package is served. Never default; empty when there's no flair.
public string Sandbox.Package.FullIdent { get; set; }
Full unique identity of this package.
string—public string Sandbox.Package.Ident { get; set; }
Unique identity of this package within its organization..
string—public Sandbox.Package.PackageInteraction Sandbox.Package.Interaction { get; set; }
Describes the authenticated user's interactions with this package. This is only available clientside for specific users in order to show things like play history state, favourite status and whether they have rated the item or not.
public bool Sandbox.Package.IsFavourite { get; set; }
True if this asset is in our favourite list.
bool—public virtual bool Sandbox.Package.IsRemote { get; set; }
Whether this is a remote or a locally installed package.
bool—public System.Collections.Immutable.ImmutableArray`1<Sandbox.Package.ChangeListSummary> Sandbox.Package.LatestChangeLists { get; set; }
The most recent visible changelists for this package (summary only - id/title/version/date). Full detail is available via `Sandbox.Package.GetChangeListsAsync(System.Int32)`. Never default; empty when there are none.
public Sandbox.Services.News Sandbox.Package.LatestNewsPost { get; set; }
The latest news post created by this package
public Sandbox.Package.LoadingScreenSetup Sandbox.Package.LoadingScreen { get; set; }
If this package is a game, it can provide media to show on the loading screen
public Sandbox.Package.AssetMetaData Sandbox.Package.Metadata { get; set; }
Server-extracted metadata for the current version's compiled asset (model stats, material flags, clothing info, ...). Null if the version hasn't been processed or its type isn't recognised. Pattern-match the concrete type, e.g. `if ( package.Metadata is Package.ModelMetaData m )`.
public string[] Sandbox.Package.PackageReferences { get; set; }
List of packages that this package depends on. These will be downloaded and installed when installing this package.
string[]—public Sandbox.Package.Type Sandbox.Package.PackageType { get; set; }
What kind of package it is.
Obsolete: Use TypeName to determine the type
public string Sandbox.Package.PrimaryAsset { get; set; }
Gets the name of the primary asset path stored in the package metadata. This could be null or empty.
string—public bool Sandbox.Package.Public { get; set; }
Whether this package is public or hidden.
bool—public int Sandbox.Package.Referenced { get; set; }
How many packages we're referenced by (roughly)
int—public int Sandbox.Package.Referencing { get; set; }
How many packages we're referencing (roughly)
int—public Sandbox.Package.ReviewStats Sandbox.Package.Reviews { get; set; }
Stats for the reviews. Gives the number of reviews, and the fraction of the total score.
public virtual Sandbox.Package.IRevision Sandbox.Package.Revision { get; set; }
Information about the current package revision/version.
public Sandbox.Package.Screenshot[] Sandbox.Package.Screenshots { get; set; }
A list of screenshots
public string Sandbox.Package.Source { get; set; }
Link to this package's sources, if set.
Obsolete: This API member is obsolete.
string—public string Sandbox.Package.Summary { get; set; }
A short summary of the package.
string—public virtual string[] Sandbox.Package.Tags { get; set; }
List of tags for this package.
string[]—public string Sandbox.Package.Thumb { get; set; }
Link to the thumbnail image of this package.
string—public string Sandbox.Package.ThumbTall { get; set; }
Link to the thumbnail image of this package.
string—public string Sandbox.Package.ThumbWide { get; set; }
Link to the thumbnail image of this package.
string—public string Sandbox.Package.Title { get; set; }
A "nice" name of this package, which will be shown to players in UI.
string—public string Sandbox.Package.TypeName { get; set; }
What kind of package it is.
string—public System.DateTimeOffset Sandbox.Package.Updated { get; set; }
When the entry was last updated. If these are different between packages then something updated on the backend.
DateTimeOffset—public string Sandbox.Package.Url { get; set; }
A link to this asset on our backend
string—public Sandbox.Package.PackageUsageStats Sandbox.Package.Usage { get; set; }
Statistics for user interactions with this package
public string Sandbox.Package.VideoThumb { get; set; }
Link to the thumbnail video of this package.
string—public int Sandbox.Package.VotesDown { get; set; }
Number of players who voted this package down.
int—public int Sandbox.Package.VotesUp { get; set; }
Number of players who voted this package up.
int—No results match this filter.