public class Sandbox.Package
Represents an asset on Asset Party.
Related Guides
Broader workflow and conceptual references connected to this API.
Your game can have multiple achievements for players to unlock.
There is a large selection of Assets (Textures, Models, Sounds, ect) available to use on sbox.game, and you can use them without needing to think about downloading the files/mounting the content/ect.
Editor Events are events that are broadcast globally throughout the editor and can be listened to/fired from any Editor Project. These are useful for creating your own custom Editor Tools and making sure they can work in tandem with existing systems.
The Storage system provides a simple, unified way to manage user-generated content in your game. Whether you're saving game progress, storing player creations, or anything else, Storage handles everything from local file management to Steam Workshop integration.
VirtualGrid is a Panel that allows you to create a grid of items virtually. What this means is that if you have 1 million items, it won't render them and try to lay them all out at the same time. It'll just pick the few that are visible and create them. When you scroll down, it'll delete the ones it can no longer see and create the new visible ones.
The API for leaderboards is publically accessible. Have fun!
Constructors
Showing 1 constructors
public Package()
No results match this filter.
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: 200skip: Default: 0token: Default: null
public static string FormatIdent(string org, string package, System.Nullable`1<int> version = null, bool local = False)
Parameters
version: Default: nulllocal: 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)
No results match this filter.
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 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.Organization Sandbox.Package.Org { get; set; }
The owner of 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 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.
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 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.
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.
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Sandbox |
| Type | class |
| Assembly | Sandbox.Engine |
| Doc ID | T:Sandbox.Package |