s&box docs

public class Sandbox.Package

Represents an asset on Asset Party.

Broader workflow and conceptual references connected to this API.

Constructors

Showing 1 constructors

Methods

Showing 20 methods

public static System.Threading.Tasks.Task`1<Sandbox.Package> Fetch(string identString, bool partial)

Find package information

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

Parameters

  • token: Default: null

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

Parameters

  • take: Default: 200
  • skip: Default: 0
  • token: Default: null

public static string FormatIdent(string org, string package, System.Nullable`1<int> version = null, bool local = False)

Parameters

  • version: Default: null
  • local: Default: False

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

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`.

Parameters

  • 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. Default: null

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.

Parameters

  • defaultValue: Default: null

public bool IsMounted()

Check if the package is installed and mounted

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

Parameters

  • token: Default: null

public static bool TryGetCached(string identString, Sandbox.Package package, bool allowPartial = True)

Find package information

Parameters

  • allowPartial: Default: True

public static bool TryParseIdent(string ident, System.ValueTuple`4<string,string,System.Nullable`1<int>,bool> parsed)

Properties

Showing 42 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.

public bool Sandbox.Package.Archived { get; set; }

Whether this package is archived or not.

public bool Sandbox.Package.CanEdit { get; set; }

True if we're a member of this package's organization.

public int Sandbox.Package.Collections { get; set; }

How many collections we're in (roughly)

public System.DateTimeOffset Sandbox.Package.Created { get; set; }

When the package was originally created.

public string Sandbox.Package.Description { get; set; }

Full description of the package.

public string[] Sandbox.Package.EditorReferences { get; set; }

List of packages that this package depended on during editing.

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.

public float Sandbox.Package.ErrorRate { get; set; }

What fraction of users got errors from this package in the last day

public int Sandbox.Package.Favourited { get; set; }

Number of players who added this package to their favourites.

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.

public string Sandbox.Package.FullIdent { get; set; }

Full unique identity of this package.

public string Sandbox.Package.Ident { get; set; }

Unique identity of this package within its organization..

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.

public virtual bool Sandbox.Package.IsRemote { get; set; }

Whether this is a remote or a locally installed package.

public Sandbox.Services.News Sandbox.Package.LatestNewsPost { get; set; }

The latest news post created by this package

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.

public Sandbox.Package.Type Sandbox.Package.PackageType { get; set; }Obsolete

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.

public bool Sandbox.Package.Public { get; set; }

Whether this package is public or hidden.

public int Sandbox.Package.Referenced { get; set; }

How many packages we're referenced by (roughly)

public int Sandbox.Package.Referencing { get; set; }

How many packages we're referencing (roughly)

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 string Sandbox.Package.Source { get; set; }

Link to this package's sources, if set.

public string Sandbox.Package.Summary { get; set; }

A short summary of the package.

public virtual string[] Sandbox.Package.Tags { get; set; }

List of tags for this package.

public string Sandbox.Package.Thumb { get; set; }

Link to the thumbnail image of this package.

public string Sandbox.Package.ThumbTall { get; set; }

Link to the thumbnail image of this package.

public string Sandbox.Package.ThumbWide { get; set; }

Link to the thumbnail image of this package.

public string Sandbox.Package.Title { get; set; }

A "nice" name of this package, which will be shown to players in UI.

public string Sandbox.Package.TypeName { get; set; }

What kind of package it is.

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.

public string Sandbox.Package.Url { get; set; }

A link to this asset on our backend

public string Sandbox.Package.VideoThumb { get; set; }

Link to the thumbnail video of this package.

public int Sandbox.Package.VotesDown { get; set; }

Number of players who voted this package down.

public int Sandbox.Package.VotesUp { get; set; }

Number of players who voted this package up.

Metadata

FieldValue
NamespaceSandbox
Typeclass
AssemblySandbox.Engine
Doc IDT:Sandbox.Package

On this page

Constructorspublic Package()Methodspublic static System.Threading.Tasks.Task`1<Sandbox.Package> Fetch(System.String identString, System.Boolean partial)public static System.Threading.Tasks.Task`1<Sandbox.Package> FetchAsync(System.String identString, System.Boolean partial, System.Boolean useCache)public static System.Threading.Tasks.Task`1<Sandbox.Package> FetchAsync(System.String identString, System.Boolean partial)public static System.Threading.Tasks.Task`1<System.Collections.Generic.List`1<Sandbox.Package.IRevision>> FetchVersions(System.String identString, System.Threading.CancellationToken token = null)public static System.Threading.Tasks.Task`1<Sandbox.Package.FindResult> FindAsync(System.String query, System.Int32 take = 200, System.Int32 skip = 0, System.Threading.CancellationToken token = null)public static System.String FormatIdent(System.String org, System.String package, System.Nullable`1<System.Int32> version = null, System.Boolean local = False)public System.Threading.Tasks.ValueTask`1<Sandbox.AchievementCollection> GetAchievements()public T GetCachedMeta(System.String keyName, T defaultValue = null)public T GetCachedMeta(System.String keyName, System.Func`1<T> defaultValue)public static System.String GetCachedTitle(System.String ident)public virtual T GetMeta(System.String keyName, T defaultValue = null)public virtual T GetValue(System.String name, T defaultValue = null)public System.Boolean IsMounted()public static System.Threading.Tasks.Task`1<Sandbox.Package.ListResult> ListAsync(System.String id, System.Threading.CancellationToken token = null)public System.Threading.Tasks.Task`1<Sandbox.BaseFileSystem> MountAsync(System.Boolean withCode = False)public static System.Threading.Tasks.Task`1<Sandbox.Package> MountAsync(System.String identString, System.Boolean partial)public static System.Collections.Generic.IEnumerable`1<Sandbox.Package> SortByReferences(System.Collections.Generic.IEnumerable`1<Sandbox.Package> unordered)public static System.Collections.Generic.IEnumerable`1<T> SortByReferences(System.Collections.Generic.IEnumerable`1<T> unordered, System.Func`2<T,Sandbox.Package> getPackageFunc)public static System.Boolean TryGetCached(System.String identString, Sandbox.Package package, System.Boolean allowPartial = True)public static System.Boolean TryParseIdent(System.String ident, System.ValueTuple`4<System.String,System.String,System.Nullable`1<System.Int32>,System.Boolean> parsed)Propertiespublic System.Int32 Sandbox.Package.ApiVersion { get; set; }public System.Boolean Sandbox.Package.Archived { get; set; }public System.Boolean Sandbox.Package.CanEdit { get; set; }public System.Int32 Sandbox.Package.Collections { get; set; }public System.DateTimeOffset Sandbox.Package.Created { get; set; }public System.String Sandbox.Package.Description { get; set; }public System.String[] Sandbox.Package.EditorReferences { get; set; }public System.Int32 Sandbox.Package.EngineVersion { get; set; }public System.Single Sandbox.Package.ErrorRate { get; set; }public System.Int32 Sandbox.Package.Favourited { get; set; }public System.Single Sandbox.Package.FileSize { get; set; }public System.String Sandbox.Package.FullIdent { get; set; }public System.String Sandbox.Package.Ident { get; set; }public Sandbox.Package.PackageInteraction Sandbox.Package.Interaction { get; set; }public System.Boolean Sandbox.Package.IsFavourite { get; set; }public virtual System.Boolean Sandbox.Package.IsRemote { get; set; }public Sandbox.Services.News Sandbox.Package.LatestNewsPost { get; set; }public Sandbox.Package.LoadingScreenSetup Sandbox.Package.LoadingScreen { get; set; }public Sandbox.Package.Organization Sandbox.Package.Org { get; set; }public System.String[] Sandbox.Package.PackageReferences { get; set; }public Sandbox.Package.Type Sandbox.Package.PackageType { get; set; }public System.String Sandbox.Package.PrimaryAsset { get; set; }public System.Boolean Sandbox.Package.Public { get; set; }public System.Int32 Sandbox.Package.Referenced { get; set; }public System.Int32 Sandbox.Package.Referencing { get; set; }public Sandbox.Package.ReviewStats Sandbox.Package.Reviews { get; set; }public virtual Sandbox.Package.IRevision Sandbox.Package.Revision { get; set; }public Sandbox.Package.Screenshot[] Sandbox.Package.Screenshots { get; set; }public System.String Sandbox.Package.Source { get; set; }public System.String Sandbox.Package.Summary { get; set; }public virtual System.String[] Sandbox.Package.Tags { get; set; }public System.String Sandbox.Package.Thumb { get; set; }public System.String Sandbox.Package.ThumbTall { get; set; }public System.String Sandbox.Package.ThumbWide { get; set; }public System.String Sandbox.Package.Title { get; set; }public System.String Sandbox.Package.TypeName { get; set; }public System.DateTimeOffset Sandbox.Package.Updated { get; set; }public System.String Sandbox.Package.Url { get; set; }public Sandbox.Package.PackageUsageStats Sandbox.Package.Usage { get; set; }public System.String Sandbox.Package.VideoThumb { get; set; }public System.Int32 Sandbox.Package.VotesDown { get; set; }public System.Int32 Sandbox.Package.VotesUp { get; set; }Metadata