Api Sandbox DataModel ProjectConfig
class

ProjectConfig

public class ProjectConfig

Configuration of a Project.

Constructors

ProjectConfig()

Properties

Name Type Description
Directory DirectoryInfo The directory housing this addon (TODO)
AssetsDirectory DirectoryInfo The directory housing this addon (TODO)
Title String The human readable title, for example "Sandbox", "Counter-Strike"
Type String The type of addon. Current valid values are "game"
Org String The ident of the org that owns this addon. For example "facepunch", "valve".
Ident String The ident of this addon. For example "sandbox", "cs" or "dm98"
PackageType Type Type of the package.
FullIdent String Returns a combination of Org and Ident - for example "facepunch.sandbox" or "valve.cs".
Schema Int32 The version of the addon file. Allows us to upgrade internally.
IncludeSourceFiles Boolean If true then we'll include all the source files
Resources String A list of paths in which to look for extra assets to upload with the addon. Note that compiled asset files are automatically included.
PackageReferences List<String> A list of packages that this package depends on. These should be installed alongside this package.
EditorReferences List<String> A list of packages that this package uses but there is no need to install. For example, a map package might use a model package - but there is no need to download that model package because any usage will organically be included in the manifest. However, when loading this item in the editor, it'd make sense to install these 'cloud' packages.
Mounts List<String> A list of mounts that are required
IsStandaloneOnly Boolean Whether or not this project is standalone-only, and supports disabling the whitelist, compiling with /unsafe, etc.
Metadata Dictionary<String, Object> Custom key-value storage for this project.

Methods

String ToJson()

Serialize the entire config to a JSON string.

Boolean TryGetMeta(String keyname, T outvalue)

Try to get a value at given key in Metadata.

keyname — The key to retrieve the value of.
outvalue — The value, if it was present in the metadata storage.
returns — Whether the value was successfully retrieved.
T GetMetaOrDefault(String keyname, T defaultValue)

Get the package's meta value. If it's missing or the wrong type then use the default value.

Boolean SetMeta(String keyname, Object outvalue)

Store custom data at given key in the Metadata.

keyname — The key for the data.
outvalue — The data itself to store.
returns — Always true.
Assembly: Sandbox.Engine Namespace: Sandbox.DataModel Full Name: Sandbox.DataModel.ProjectConfig