s&box docs

public class Editor.ProjectPublisher

Methods

Showing 12 methods

public System.Threading.Tasks.Task AddCodePackageReference(string package)

If the code is referencing a package - we can add it to the manifest using this.

public static bool CanPublishFile(Editor.Asset a)

Return true if we're not opposed to publishing this asset

public System.Collections.Generic.List`1<Sandbox.DataModel.GameSetting> GetGameSettings(Sandbox.CompilerOutput[] assemblies)

Fetch a list of game settings to be added to the project's metadata

public System.Threading.Tasks.Task PrePublish(System.Threading.CancellationToken cancellationToken = null)

Check the intended manifest, ask the backend which files need to be uploaded.

Parameters

  • cancellationToken: Default: null

public System.Threading.Tasks.Task Publish(Editor.IProgress progress = null, System.Threading.CancellationToken cancel = null)

Publish a new revision

Parameters

  • progress: Default: null
  • cancel: Default: null

public void SetChangeDetails(string change, string detail)

Allows to set information on the revision - for future reference

public void SetMeta(string key, object obj)

public System.Threading.Tasks.Task UploadFiles()

Properties

Showing 7 properties

Metadata

FieldValue
NamespaceEditor
Typeclass
AssemblySandbox.Tools
Doc IDT:Editor.ProjectPublisher

On this page

Methodspublic System.Threading.Tasks.Task AddCodePackageReference(System.String package)public System.Threading.Tasks.Task AddFile(System.Byte[] contents, System.String relativePath)public System.Threading.Tasks.Task AddFile(System.String contents, System.String relativePath)public static System.Boolean CanPublishFile(Editor.Asset a)public static System.Threading.Tasks.Task`1<Editor.ProjectPublisher> FromAsset(Editor.Asset asset)public static System.Threading.Tasks.Task`1<Editor.ProjectPublisher> FromProject(Sandbox.Project project)public System.Collections.Generic.List`1<Sandbox.DataModel.GameSetting> GetGameSettings(Sandbox.CompilerOutput[] assemblies)public System.Threading.Tasks.Task PrePublish(System.Threading.CancellationToken cancellationToken = null)public System.Threading.Tasks.Task Publish(Editor.IProgress progress = null, System.Threading.CancellationToken cancel = null)public System.Void SetChangeDetails(System.String change, System.String detail)public System.Void SetMeta(System.String key, System.Object obj)public System.Threading.Tasks.Task UploadFiles()Propertiespublic System.Collections.Generic.IEnumerable`1<Editor.ProjectPublisher.ProjectFile> Editor.ProjectPublisher.Files { get; set; }public Editor.ProjectPublisher.PackageManifest Editor.ProjectPublisher.Manifest { get; set; }public System.Int32 Editor.ProjectPublisher.MissingFileCount { get; set; }public System.Int64 Editor.ProjectPublisher.MissingFileSize { get; set; }public System.Action Editor.ProjectPublisher.OnProgressChanged { get; set; }public System.String Editor.ProjectPublisher.TargetPackageIdent { get; set; }public System.Int32 Editor.ProjectPublisher.TotalFileCount { get; set; }Metadata