Api Sandbox ResourcePublishContext
class

ResourcePublishContext

public sealed class ResourcePublishContext

Created by the editor when publishing a resource, passed into Resource.ConfigurePublishing. This allows the resource to configure how it wants to be published.

Constructors

ResourcePublishContext()

Properties

Name Type Description
PublishingEnabled Boolean Can be set to false using SetPublishingDisabled
ReasonForDisabling String If publishing is disabled this will be the message to display why.
CreateThumbnailFunction Func<Bitmap> A function to create a thumbnail for this resource. If not null, this will be called to create the thumbnail.
IncludeCode Boolean If true we'll include the addon's code with this
CanIncludeSourceFiles Boolean If true then we'll offer an option to upload source files with this asset. This will make it easier for people who want to download and add it to their project, but make their own changes.

Methods

Void SetPublishingDisabled(String reason)

Allows you to disable publishing for this resource, with a reason that'll be shown to the user.

Assembly: Sandbox.Engine Namespace: Sandbox Full Name: Sandbox.ResourcePublishContext