ProjectPublisherclass
Methods19
Showing 19 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.
| Parameter | Type | Description |
|---|---|---|
| package | string | — |
Task—public static bool CanPublishFile(Editor.Asset a)
Return true if we're not opposed to publishing this asset
| Parameter | Type | Description |
|---|---|---|
| a | Asset | — |
bool—public static Sandbox.Bitmap CropToSquare(Sandbox.Bitmap image)
The middle of this image, cut square - Steam shows workshop items' main thumbnails square. A new bitmap.
| Parameter | Type | Description |
|---|---|---|
| image | Bitmap | — |
public static System.Threading.Tasks.Task`1<Editor.ProjectPublisher> FromAsset(Editor.Asset asset)
| Parameter | Type | Description |
|---|---|---|
| asset | Asset | — |
public static System.Threading.Tasks.Task`1<Editor.ProjectPublisher> FromProject(Sandbox.Project project)
| Parameter | Type | Description |
|---|---|---|
| project | Project | — |
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
| Parameter | Type | Description |
|---|---|---|
| assemblies | CompilerOutput[] | — |
public static System.Threading.Tasks.Task`1<Editor.ProjectPublisher.PublishedWorkshopItem[]> GetPublishedWorkshopItemsAsync(string type)
The workshop items we've published of this type (e.g. "map"), newest first. Empty if Steam couldn't be asked.
| Parameter | Type | Description |
|---|---|---|
| type | string | — |
public static System.Threading.Tasks.Task`1<ulong> GetWorkshopItemIdAsync(Sandbox.Project project)
The workshop item a publish of this project goes to unless it's told otherwise - 0 if it isn't a map, or it'll make a new item
| Parameter | Type | Description |
|---|---|---|
| project | Project | — |
Task<ulong>—public static System.Threading.Tasks.Task`1<Editor.ProjectPublisher.WorkshopItemInfo> GetWorkshopItemInfoAsync(ulong id)
Ask Steam about a workshop item - not from its cache, it might have just been published
| Parameter | Type | Description |
|---|---|---|
| id | ulong | — |
public System.Threading.Tasks.Task PrePublish(System.Threading.CancellationToken cancellationToken = null)
Check the intended manifest, ask the backend which files need to be uploaded.
| Parameter | Type | Description |
|---|---|---|
| cancellationToken = null | CancellationToken | — |
Task—public System.Threading.Tasks.Task Publish(Editor.IProgress progress = null, System.Threading.CancellationToken cancel = null)
Publish a new revision
| Parameter | Type | Description |
|---|---|---|
| progress = null | IProgress | — |
| cancel = null | CancellationToken | — |
Task—public static bool PublishesToWorkshop(Sandbox.Project project)
Would publishing this project put its files in a Steam Workshop item?
| Parameter | Type | Description |
|---|---|---|
| project | Project | — |
bool—public void SetChangeDetails(string change, string detail)
Allows to set information on the revision - for future reference
| Parameter | Type | Description |
|---|---|---|
| change | string | — |
| detail | string | — |
void—public void SetMeta(string key, object obj)
| Parameter | Type | Description |
|---|---|---|
| key | string | — |
| obj | object | — |
void—public System.Threading.Tasks.Task SetThumbnail(byte[] image)
Use this image as the package's thumb instead of the one rendered from its asset - the middle of it, cut square (`Editor.ProjectPublisher.CropToSquare(Sandbox.Bitmap)`). Any image a `Sandbox.Bitmap` can read - it goes up as a png. Before `Editor.ProjectPublisher.PrePublish(System.Threading.CancellationToken)`, so it's uploaded.
| Parameter | Type | Description |
|---|---|---|
| image | byte[] | — |
Task—public void SetWorkshopItem(ulong id)
Put the files in this workshop item, or a new one with 0, rather than the one the package says. Before `Editor.ProjectPublisher.PrePublish(System.Threading.CancellationToken)`.
| Parameter | Type | Description |
|---|---|---|
| id | ulong | — |
void—public System.Threading.Tasks.Task UploadFiles()
Task—No results match this filter.
Properties17
Showing 17 properties
public System.Collections.Generic.IEnumerable`1<Editor.ProjectPublisher.ProjectFile> Editor.ProjectPublisher.Files { get; set; }
Get access to the files within the manifest
public bool Editor.ProjectPublisher.HasWorkshopUpload { get; set; }
Does this publish put its files in a Steam Workshop item?
bool—public bool Editor.ProjectPublisher.IsWorkshopUploaded { get; set; }
Have the files gone up to the workshop? A retried publish doesn't upload them again.
bool—public Editor.ProjectPublisher.PackageManifest Editor.ProjectPublisher.Manifest { get; set; }
public int Editor.ProjectPublisher.MissingFileCount { get; set; }
int—public long Editor.ProjectPublisher.MissingFileSize { get; set; }
long—public System.Action Editor.ProjectPublisher.OnProgressChanged { get; set; }
Action—public string Editor.ProjectPublisher.TargetPackageIdent { get; set; }
string—public int Editor.ProjectPublisher.TotalFileCount { get; set; }
int—public long Editor.ProjectPublisher.WorkshopBytesDone { get; set; }
How far through the current stage of the workshop upload we are, in bytes
long—public long Editor.ProjectPublisher.WorkshopBytesTotal { get; set; }
The size of the current stage of the workshop upload, in bytes. Steam doesn't know until it's started.
long—public int Editor.ProjectPublisher.WorkshopFileCount { get; set; }
How many files go in the workshop item
int—public ulong Editor.ProjectPublisher.WorkshopTargetItemId { get; set; }
The workshop item this publishes to, or 0 if it'll create a new one
ulong—public long Editor.ProjectPublisher.WorkshopUploadSize { get; set; }
The size of the files that go in the workshop item, in bytes
long—public string Editor.ProjectPublisher.WorkshopUploadStatus { get; set; }
What the workshop upload is doing right now, or null if it hasn't started
string—public string Editor.ProjectPublisher.WorkshopUrl { get; set; }
The workshop item's page on Steam, once there is one
string—public string Editor.ProjectPublisher.WorkshopWarning { get; set; }
Something whoever's publishing should know about the workshop item first, like that it isn't theirs. Null if there's nothing to say.
string—No results match this filter.