Api Sandbox Modals WorkshopPublishOptions
struct

WorkshopPublishOptions

public sealed struct WorkshopPublishOptions

Passed to IModalSystem.WorkshopPublish

Constructors

WorkshopPublishOptions()

Properties

Name Type Description
Title String The default title of this item. The user will be able to change it.
Description String The description of this item. The user will be able to change it.
Thumbnail Bitmap 512x512 thumbnail image, no transparency
StorageEntry Entry The filesystem containing the files to publish
KeyValues Dictionary<String, String> Keyvalues to store on the item. You can search and filter by these later.
Tags HashSet<String> Tags to set on the item. You can search and filter by these later.
Metadata String You can store metadata on the item, which is just a string. This can be read when querying items before downloading them - so it can be useful for storing extra info you want to store.
Visibility Visibility The visibility of the item
CanSelectVisibility Boolean Can the client select the visibility for this item
OnComplete Action<UInt64> Called when done. The ulong is the published item id. You can access it via url https://steamcommunity.com/sharedfiles/filedetails/?id=######
PublishedFileId UInt64 If set, update this existing workshop item instead of creating a new one.
Categories Dictionary<String, SerializedProperty> Defined categories to show in the workshop publish modal

Methods

Void AddCategory(String name)

Adds a new category associated with the specified enum type to the collection. The user will be prompted to select one of the enum values when publishing. This will be set on the file as keyvalues[name] = enum.ToString()

Assembly: Sandbox.Engine Namespace: Sandbox.Modals Full Name: Sandbox.Modals.WorkshopPublishOptions