Package
public class Package Represents an asset on Asset Party.
Constructors
Package() Properties
| Name | Type | Description |
|---|---|---|
IsRemote virtual | Boolean | Whether this is a remote or a locally installed package. |
Org | Organization | The owner of this package. |
FullIdent | String | Full unique identity of this package. |
Ident | String | Unique identity of this package within its organization.. |
Title | String | A "nice" name of this package, which will be shown to players in UI. |
Summary | String | A short summary of the package. |
Description | String | Full description of the package. |
Thumb | String | Link to the thumbnail image of this package. |
ThumbWide | String | Link to the thumbnail image of this package. |
ThumbTall | String | Link to the thumbnail image of this package. |
VideoThumb | String | Link to the thumbnail video of this package. |
EngineVersion | Int32 | Engine version this package was uploaded with. This is useful for when the base game undergoes large API changes. |
Tags virtual | String[] | List of tags for this package. |
PackageReferences | String[] | List of packages that this package depends on. These will be downloaded and installed when installing this package. |
EditorReferences | String[] | List of packages that this package depended on during editing. |
PackageType | Type | What kind of package it is. |
TypeName | String | What kind of package it is. |
Public | Boolean | Whether this package is public or hidden. |
Archived | Boolean | Whether this package is archived or not. |
FileSize | Single | 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. |
Usage | PackageUsageStats | Statistics for user interactions with this package |
Favourited | Int32 | Number of players who added this package to their favourites. |
VotesUp | Int32 | Number of players who voted this package up. |
VotesDown | Int32 | Number of players who voted this package down. |
Source | String | Link to this package's sources, if set. |
ApiVersion | Int32 | For game extension compatibility. Game targeting extensions are only compatible with that game if the API Versions match. |
Screenshots | Screenshot[] | A list of screenshots |
IsFavourite | Boolean | True if this asset is in our favourite list. |
CanEdit | Boolean | True if we're a member of this package's organization. |
Url | String | A link to this asset on our backend |
Updated | DateTimeOffset | When the entry was last updated. If these are different between packages then something updated on the backend. |
Created | DateTimeOffset | When the package was originally created. |
Collections | Int32 | How many collections we're in (roughly) |
Referencing | Int32 | How many packages we're referencing (roughly) |
Referenced | Int32 | How many packages we're referenced by (roughly) |
Reviews | ReviewStats | Stats for the reviews. Gives the number of reviews, and the fraction of the total score. |
ErrorRate | Single | What fraction of users got errors from this package in the last day |
LatestNewsPost | News | The latest news post created by this package |
Revision virtual | IRevision | Information about the current package revision/version. |
Interaction | PackageInteraction | 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. |
LoadingScreen | LoadingScreenSetup | If this package is a game, it can provide media to show on the loading screen |
PrimaryAsset | String | Gets the name of the primary asset path stored in the package metadata. This could be null or empty. |
Methods
ValueTask<AchievementCollection> GetAchievements() Get a list of achievements
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.
Task<BaseFileSystem> MountAsync(Boolean withCode = False) Download and mount this package. If withCode is true we'll try to load the assembly if it exists.
virtual T GetMeta(String keyName, T defaultValue = null) Get metadata value from this package for given key. This will be specific to each Type.
keyName — The name of the key to look up. defaultValue — Default value to return when requested key was not present in the package's metadata. T GetCachedMeta(String keyName, T defaultValue = null) String,``0) but with cache.
T GetCachedMeta(String keyName, Func<T> defaultValue) Boolean IsMounted() Check if the package is installed and mounted
static Boolean TryParseIdent(String ident, Boolean? parsed) static String FormatIdent(String org, String package, Int32? version = null, Boolean local = False) static Task<Package> FetchAsync(String identString, Boolean partial) Find package information
static Task<Package> FetchAsync(String identString, Boolean partial, Boolean useCache) Find package information
static Task<Package> MountAsync(String identString, Boolean partial) Mount a package by ident. This is the same as FetchAsync but it also mounts the package, which means it will be available for use right away. If you just want the package information, use FetchAsync.
static Boolean TryGetCached(String identString, Package package, Boolean allowPartial = True) Find package information
static Task<Package> Fetch(String identString, Boolean partial) Find package information
static String GetCachedTitle(String ident) If we have this package information, try to get its name
static Task<FindResult> FindAsync(String query, Int32 take = 200, Int32 skip = 0, CancellationToken token = null) Retrieve a list of packages
static Task<ListResult> ListAsync(String id, CancellationToken token = null) Retrieve a list of packages, organised into groups, for discovery
static IEnumerable<Package> SortByReferences(IEnumerable<Package> unordered) static IEnumerable<T> SortByReferences(IEnumerable<T> unordered, Func<T, Package> getPackageFunc) static List<IRevision>> FetchVersions(String identString, CancellationToken token = null) Get package version list