s&box docs
API ReferenceSandbox.DataModel

public class Sandbox.DataModel.ProjectConfig

Configuration of a `Sandbox.Project`.

Constructors

Showing 1 constructors

Methods

Showing 4 methods

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

public bool SetMeta(string keyname, object outvalue)

Store custom data at given key in the `Sandbox.DataModel.ProjectConfig.Metadata`.

Parameters

  • keyname: The key for the data.
  • outvalue: The data itself to store.

Returns

Always true.

public string ToJson()

Serialize the entire config to a JSON string.

public bool TryGetMeta(string keyname, T outvalue)

Try to get a value at given key in `Sandbox.DataModel.ProjectConfig.Metadata`.

Parameters

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

Properties

Showing 16 properties

public System.IO.DirectoryInfo Sandbox.DataModel.ProjectConfig.AssetsDirectory { get; set; }

The directory housing this addon (TODO)

public System.IO.DirectoryInfo Sandbox.DataModel.ProjectConfig.Directory { get; set; }

The directory housing this addon (TODO)

public System.Collections.Generic.List`1<string> Sandbox.DataModel.ProjectConfig.EditorReferences { get; set; }

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.

public string Sandbox.DataModel.ProjectConfig.FullIdent { get; set; }

Returns a combination of Org and Ident - for example "facepunch.sandbox" or "valve.cs".

public string Sandbox.DataModel.ProjectConfig.Ident { get; set; }

The ident of this addon. For example "sandbox", "cs" or "dm98"

public bool Sandbox.DataModel.ProjectConfig.IncludeSourceFiles { get; set; }

If true then we'll include all the source files

public bool Sandbox.DataModel.ProjectConfig.IsStandaloneOnly { get; set; }

Whether or not this project is standalone-only, and supports disabling the whitelist, compiling with /unsafe, etc.

public System.Collections.Generic.Dictionary`2<string,object> Sandbox.DataModel.ProjectConfig.Metadata { get; set; }

Custom key-value storage for this project.

public System.Collections.Generic.List`1<string> Sandbox.DataModel.ProjectConfig.Mounts { get; set; }

A list of mounts that are required

public string Sandbox.DataModel.ProjectConfig.Org { get; set; }

The ident of the org that owns this addon. For example "facepunch", "valve".

public System.Collections.Generic.List`1<string> Sandbox.DataModel.ProjectConfig.PackageReferences { get; set; }

A list of packages that this package depends on. These should be installed alongside this package.

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

Type of the package.

Obsolete: Compare string Type instead

public string Sandbox.DataModel.ProjectConfig.Resources { get; set; }

A list of paths in which to look for extra assets to upload with the addon. Note that compiled asset files are automatically included.

public int Sandbox.DataModel.ProjectConfig.Schema { get; set; }

The version of the addon file. Allows us to upgrade internally.

public string Sandbox.DataModel.ProjectConfig.Title { get; set; }

The human readable title, for example "Sandbox", "Counter-Strike"

public string Sandbox.DataModel.ProjectConfig.Type { get; set; }

The type of addon. Current valid values are "game"

Metadata

FieldValue
NamespaceSandbox.DataModel
Typeclass
AssemblySandbox.Engine
Doc IDT:Sandbox.DataModel.ProjectConfig

On this page

Constructorspublic ProjectConfig()Methodspublic T GetMetaOrDefault(System.String keyname, T defaultValue)public System.Boolean SetMeta(System.String keyname, System.Object outvalue)public System.String ToJson()public System.Boolean TryGetMeta(System.String keyname, T outvalue)Propertiespublic System.IO.DirectoryInfo Sandbox.DataModel.ProjectConfig.AssetsDirectory { get; set; }public System.IO.DirectoryInfo Sandbox.DataModel.ProjectConfig.Directory { get; set; }public System.Collections.Generic.List`1<System.String> Sandbox.DataModel.ProjectConfig.EditorReferences { get; set; }public System.String Sandbox.DataModel.ProjectConfig.FullIdent { get; set; }public System.String Sandbox.DataModel.ProjectConfig.Ident { get; set; }public System.Boolean Sandbox.DataModel.ProjectConfig.IncludeSourceFiles { get; set; }public System.Boolean Sandbox.DataModel.ProjectConfig.IsStandaloneOnly { get; set; }public System.Collections.Generic.Dictionary`2<System.String,System.Object> Sandbox.DataModel.ProjectConfig.Metadata { get; set; }public System.Collections.Generic.List`1<System.String> Sandbox.DataModel.ProjectConfig.Mounts { get; set; }public System.String Sandbox.DataModel.ProjectConfig.Org { get; set; }public System.Collections.Generic.List`1<System.String> Sandbox.DataModel.ProjectConfig.PackageReferences { get; set; }public Sandbox.Package.Type Sandbox.DataModel.ProjectConfig.PackageType { get; set; }public System.String Sandbox.DataModel.ProjectConfig.Resources { get; set; }public System.Int32 Sandbox.DataModel.ProjectConfig.Schema { get; set; }public System.String Sandbox.DataModel.ProjectConfig.Title { get; set; }public System.String Sandbox.DataModel.ProjectConfig.Type { get; set; }Metadata