s&
About
The Project
info
About s&box
map
Roadmap
monitoring
Metrics
Engine startup and usage numbers
Updates
newspaper
Latest News
published_with_changes
Changes
Release-by-release changelog
Games
Browse Games
Discover Games
gamejams
Workshop
Playable
sports_esports
Games
Standalone games and gamemodes
Assets
landscape
Maps
view_in_ar
Models
texture
Materials
apparel
Clothing
apps
Everything
Every asset type in one list
Forum
Learn
Documentation
rocket_launch
Getting Started
docs
Documentation
api
API Reference
Resources
school
Tutorials
manage_search
Code Search
Get s&box
Sign in with Steam
Api
Editor Classes
ProjectPublisher
chevron_left
Editor Classes
class
ProjectPublisher
Properties
data_object
Files
data_object
HasWorkshopUpload
data_object
IsWorkshopUploaded
data_object
Manifest
data_object
MissingFileCount
data_object
MissingFileSize
data_object
OnProgressChanged
data_object
TargetPackageIdent
data_object
TotalFileCount
data_object
WorkshopBytesDone
data_object
WorkshopBytesTotal
data_object
WorkshopFileCount
data_object
WorkshopTargetItemId
data_object
WorkshopUploadSize
data_object
WorkshopUploadStatus
data_object
WorkshopUrl
data_object
WorkshopWarning
Methods
functions
AddCodePackageReference
functions
AddFile
functions
GetGameSettings
functions
PrePublish
functions
Publish
functions
SetChangeDetails
functions
SetMeta
functions
SetThumbnail
functions
SetWorkshopItem
functions
SetWorkshopVisibility
functions
UploadFiles
Static Fields
crop_din
AddonTypesMetaKey
crop_din
MaxPickedWorkshopTags
crop_din
WorkshopTagsMetaKey
Static Methods
functions
CanPublishFile
functions
CropToSquare
functions
FromAsset
functions
FromProject
functions
GetPublishedWorkshopItemsAsync
functions
GetWorkshopItemIdAsync
functions
GetWorkshopItemInfoAsync
functions
PlayerTags
functions
PublishesOnlyToWorkshop
functions
PublishesToWorkshop
functions
WorkshopTagChoices
ProjectPublisher
class
Editor
.
Sandbox.Tools
data_object
Properties
17
Files
IEnumerable`1
Get access to the files within the manifest
HasWorkshopUpload
bool
Does this publish put its files in a Steam Workshop item?
IsWorkshopUploaded
bool
Have the files gone up to the workshop? A retried publish doesn't upload them again.
Manifest
PackageManifest
MissingFileCount
int
MissingFileSize
long
OnProgressChanged
Action
TargetPackageIdent
string
TotalFileCount
int
WorkshopBytesDone
long
How far through the current stage of the workshop upload we are, in bytes
WorkshopBytesTotal
long
The size of the current stage of the workshop upload, in bytes. Steam doesn't know until it's started.
WorkshopFileCount
int
How many files go in the workshop item
WorkshopTargetItemId
UInt64
The workshop item this publishes to, or 0 if it'll create a new one
WorkshopUploadSize
long
The size of the files that go in the workshop item, in bytes
WorkshopUploadStatus
string
What the workshop upload is doing right now, or null if it hasn't started
WorkshopUrl
string
The workshop item's page on Steam, once there is one
WorkshopWarning
string
Something whoever's publishing should know about the workshop item first, like that it isn't theirs. Null if there's nothing to say.
functions
Methods
11
AddCodePackageReference
(
package
)
Task
If the code is referencing a package - we can add it to the manifest using this.
AddFile
(
contents
,
relativePath
)
Task
Manually add a file to the manifest
GetGameSettings
(
assemblies
)
List`1
Fetch a list of game settings to be added to the project's metadata
PrePublish
(
cancellationToken
)
Task
Prepare the Workshop files and, for projects with a backend package, check which backend files need uploading.
Publish
(
progress
,
cancel
)
Task
Publish a new revision
SetChangeDetails
(
change
,
detail
)
Allows to set information on the revision - for future reference
SetMeta
(
key
,
obj
)
SetThumbnail
(
image
)
Task
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.
SetWorkshopItem
(
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).
SetWorkshopVisibility
(
visibility
)
Who can see the workshop item once it's published. Before Editor.ProjectPublisher.Publish(Editor.IProgress,System.Threading.CancellationToken).
UploadFiles
(
)
Task
crop_din
Static Fields
3
AddonTypesMetaKey
string
The meta key of a game's addon types (Sandbox.PackageInfo.AddonTypes)
MaxPickedWorkshopTags
int
The most tags that can be picked for an item - enough to say what it is, and it keeps room for the ones a game gets from its player settings (Steam takes 32 at most)
WorkshopTagsMetaKey
string
The project meta key the tags picked for its workshop item are kept under
functions
Static Methods
11
CanPublishFile
(
a
)
bool
Return true if we're not opposed to publishing this asset
CropToSquare
(
image
)
Bitmap
The middle of this image, cut square - Steam shows workshop items' main thumbnails square. A new bitmap.
FromAsset
(
asset
)
Task`1
FromProject
(
project
,
previewOnly
,
cancel
)
Task`1
GetPublishedWorkshopItemsAsync
(
type
)
Task`1
The workshop items we've published of this type (e.g. "map" or "game"), newest first. Empty if Steam couldn't be asked.
GetWorkshopItemIdAsync
(
project
)
Task`1
The workshop item a publish of this project goes to unless it's told otherwise - 0 if it isn't a map, game or addon, or it'll make a new item
GetWorkshopItemInfoAsync
(
id
)
Task`1
Ask Steam about a workshop item - not from its cache, it might have just been published
PlayerTags
(
config
)
List`1
The tags a game's workshop item gets for how it's played - singleplayer, multiplayer, co-op and versus - made from its player settings rather than picked
PublishesOnlyToWorkshop
(
project
)
bool
Addons are identified and published entirely through Steam Workshop, without a backend package.
PublishesToWorkshop
(
project
)
bool
Would publishing this project put its files in a Steam Workshop item?
WorkshopTagChoices
(
type
)
String[]
The tags that can be picked for a workshop item of this type ("map" or "game"). Keep them the same as the Workshop tags on Steamworks, so Steam's own filters match.
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.