ResourcePublishContextclass

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

objectResourcePublishContext
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public sealed class Sandbox.ResourcePublishContext

Constructors1

Showing 1 constructors

Methods1

Showing 1 methods

public void SetPublishingDisabled(string reason)PUBLIC

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

ParameterTypeDescription
reasonstring
Returns:void

Properties5

Showing 5 properties

public bool Sandbox.ResourcePublishContext.CanIncludeSourceFiles { get; set; }PUBLICGETSET

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.

Returns:bool

public System.Func`1<Sandbox.Bitmap> Sandbox.ResourcePublishContext.CreateThumbnailFunction { get; set; }PUBLICGETSET

A function to create a thumbnail for this resource. If not null, this will be called to create the thumbnail.

Returns:Func<Bitmap>

public bool Sandbox.ResourcePublishContext.IncludeCode { get; set; }PUBLICGETSET

If true we'll include the addon's code with this

Returns:bool

public bool Sandbox.ResourcePublishContext.PublishingEnabled { get; set; }PUBLICGETSET

Can be set to false using SetPublishingDisabled

Returns:bool

public string Sandbox.ResourcePublishContext.ReasonForDisabling { get; set; }PUBLICGETSET

If publishing is disabled this will be the message to display why.

Returns:string

On this page