EditorExportPlatformExtension

package
v0.0.0-...-c858641 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2025 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

External graphics.gd/classdb/EditorExportPlatform implementations should inherit from this class.

To use graphics.gd/classdb/EditorExportPlatform, register it using the graphics.gd/classdb/EditorPlugin.Instance.AddExportPlatform method first.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advanced

type Advanced = class

Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.

type Any

type Any interface {
	gd.IsClass
	AsEditorExportPlatformExtension() Instance
}

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this [Extension]See Interface for methods that can be overridden by T.

func (*Extension[T]) AsEditorExportPlatform

func (self *Extension[T]) AsEditorExportPlatform() EditorExportPlatform.Instance

func (*Extension[T]) AsEditorExportPlatformExtension

func (self *Extension[T]) AsEditorExportPlatformExtension() Instance

func (*Extension[T]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

func (*Extension[T]) AsRefCounted

func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted

type ID

type ID Object.ID

ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

type Implementation

type Implementation = implementation

Implementation implements Interface with empty methods.

type Instance

Instance of the class with convieniently typed arguments and results.

var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func New

func New() Instance

func (Instance) AsEditorExportPlatform

func (self Instance) AsEditorExportPlatform() EditorExportPlatform.Instance

func (Instance) AsEditorExportPlatformExtension

func (self Instance) AsEditorExportPlatformExtension() Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) GetConfigError

func (self Instance) GetConfigError() string

Returns current configuration error message text. This method should be called only from the [Interface.CanExport], [Interface.HasValidExportConfiguration], or [Interface.HasValidProjectConfiguration] implementations.

func (Instance) GetConfigMissingTemplates

func (self Instance) GetConfigMissingTemplates() bool

Returns true is export templates are missing from the current configuration. This method should be called only from the [Interface.CanExport], [Interface.HasValidExportConfiguration], or [Interface.HasValidProjectConfiguration] implementations.

func (Instance) ID

func (self Instance) ID() ID

func (Instance) SetConfigError

func (self Instance) SetConfigError(error_text string)

Sets current configuration error message text. This method should be called only from the [Interface.CanExport], [Interface.HasValidExportConfiguration], or [Interface.HasValidProjectConfiguration] implementations.

func (Instance) SetConfigMissingTemplates

func (self Instance) SetConfigMissingTemplates(missing_templates bool)

Set to true is export templates are missing from the current configuration. This method should be called only from the [Interface.CanExport], [Interface.HasValidExportConfiguration], or [Interface.HasValidProjectConfiguration] implementations.

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

type Interface

type Interface interface {
	// Required.
	//
	// Returns array of platform specific features for the specified 'preset'.
	GetPresetFeatures(preset EditorExportPreset.Instance) []string
	// Optional.
	//
	// Returns true if specified file is a valid executable (native executable or script) for the target platform.
	IsExecutable(path string) bool
	// Optional.
	//
	// Returns a property list, as an slice of dictionaries. Each data structure must at least contain the name: StringName and type: Variant.Type entries.
	//
	// Additionally, the following keys are supported:
	//
	// - hint: PropertyHint
	//
	// - hint_string: String
	//
	// - usage: PropertyUsageFlags
	//
	// - class_name: StringName
	//
	// - default_value: Variant, default value of the property.
	//
	// - update_visibility: bool, if set to true, [Interface.GetExportOptionVisibility] is called for each property when this property is changed.
	//
	// - required: bool, if set to true, this property warnings are critical, and should be resolved to make export possible. This value is a hint for the [Interface.HasValidExportConfiguration] implementation, and not used by the engine directly.
	//
	// See also [graphics.gd/classdb/Object.Instance.GetPropertyList].
	GetExportOptions() [][]struct {
		Hint             int         "gd:\"hint\""
		HintString       string      "gd:\"hint_string\""
		Usage            int         "gd:\"usage\""
		ClassName        string      "gd:\"class_name\""
		DefaultValue     interface{} "gd:\"default_value\""
		UpdateVisibility bool        "gd:\"update_visibility\""
		Required         bool        "gd:\"required\""
	}
	// Optional.
	//
	// Returns true if export options list is changed and presets should be updated.
	ShouldUpdateExportOptions() bool
	// Optional.
	//
	// Validates 'option' and returns visibility for the specified 'preset'. Default implementation return true for all options.
	GetExportOptionVisibility(preset EditorExportPreset.Instance, option string) bool
	// Optional.
	//
	// Validates 'option' and returns warning message for the specified 'preset'. Default implementation return empty string for all options.
	GetExportOptionWarning(preset EditorExportPreset.Instance, option string) string
	// Required.
	//
	// Returns target OS name.
	GetOsName() string
	// Required.
	//
	// Returns export platform name.
	GetName() string
	//
	// Returns platform logo displayed in the export dialog, logo should be 32x32 adjusted to the current editor scale, see [graphics.gd/classdb/EditorInterface.GetEditorScale].
	GetLogo() Texture2D.Instance
	// Optional.
	//
	// Returns true if one-click deploy options are changed and editor interface should be updated.
	PollExport() bool
	// Optional.
	//
	// Returns number one-click deploy devices (or other one-click option displayed in the menu).
	GetOptionsCount() int
	// Optional.
	//
	// Returns tooltip of the one-click deploy menu button.
	GetOptionsTooltip() string
	// Optional.
	//
	// Returns one-click deploy menu item icon for the specified 'device', icon should be 16x16 adjusted to the current editor scale, see [graphics.gd/classdb/EditorInterface.GetEditorScale].
	GetOptionIcon(device int) ImageTexture.Instance
	// Optional.
	//
	// Returns one-click deploy menu item label for the specified 'device'.
	GetOptionLabel(device int) string
	// Optional.
	//
	// Returns one-click deploy menu item tooltip for the specified 'device'.
	GetOptionTooltip(device int) string
	// Optional.
	//
	// Returns device architecture for one-click deploy.
	GetDeviceArchitecture(device int) string
	// Optional.
	//
	// Called by the editor before platform is unregistered.
	Cleanup()
	// Optional.
	//
	// This method is called when 'device' one-click deploy menu option is selected.
	//
	// Implementation should export project to a temporary location, upload and run it on the specific 'device', or perform another action associated with the menu item.
	Run(preset EditorExportPreset.Instance, device int, debug_flags EditorExportPlatform.DebugFlags) error
	// Optional.
	//
	// Returns icon of the one-click deploy menu button, icon should be 16x16 adjusted to the current editor scale, see [graphics.gd/classdb/EditorInterface.GetEditorScale].
	GetRunIcon() Texture2D.Instance
	// Optional.
	//
	// Returns true, if specified 'preset' is valid and can be exported. Use [Instance.SetConfigError] and [Instance.SetConfigMissingTemplates] to set error details.
	//
	// Usual implementation can call [Interface.HasValidExportConfiguration] and [Interface.HasValidProjectConfiguration] to determine if export is possible.
	CanExport(preset EditorExportPreset.Instance, debug bool) bool
	// Required.
	//
	// Returns true if export configuration is valid.
	HasValidExportConfiguration(preset EditorExportPreset.Instance, debug bool) bool
	// Required.
	//
	// Returns true if project configuration is valid.
	HasValidProjectConfiguration(preset EditorExportPreset.Instance) bool
	// Required.
	//
	// Returns array of supported binary extensions for the full project export.
	GetBinaryExtensions(preset EditorExportPreset.Instance) []string
	// Required.
	//
	// Creates a full project at 'path' for the specified 'preset'.
	//
	// This method is called when "Export" button is pressed in the export dialog.
	//
	// This method implementation can call [graphics.gd/classdb/EditorExportPlatform.Instance.SavePack] or [graphics.gd/classdb/EditorExportPlatform.Instance.SaveZip] to use default PCK/ZIP export process, or calls [graphics.gd/classdb/EditorExportPlatform.Instance.ExportProjectFiles] and implement custom callback for processing each exported file.
	ExportProject(preset EditorExportPreset.Instance, debug bool, path string, flags EditorExportPlatform.DebugFlags) error
	// Optional.
	//
	// Creates a PCK archive at 'path' for the specified 'preset'.
	//
	// This method is called when "Export PCK/ZIP" button is pressed in the export dialog, with "Export as Patch" disabled, and PCK is selected as a file type.
	ExportPack(preset EditorExportPreset.Instance, debug bool, path string, flags EditorExportPlatform.DebugFlags) error
	// Optional.
	//
	// Create a ZIP archive at 'path' for the specified 'preset'.
	//
	// This method is called when "Export PCK/ZIP" button is pressed in the export dialog, with "Export as Patch" disabled, and ZIP is selected as a file type.
	ExportZip(preset EditorExportPreset.Instance, debug bool, path string, flags EditorExportPlatform.DebugFlags) error
	// Optional.
	//
	// Creates a patch PCK archive at 'path' for the specified 'preset', containing only the files that have changed since the last patch.
	//
	// This method is called when "Export PCK/ZIP" button is pressed in the export dialog, with "Export as Patch" enabled, and PCK is selected as a file type.
	//
	// Note: The patches provided in 'patches' have already been loaded when this method is called and are merely provided as context. When empty the patches defined in the export preset have been loaded instead.
	ExportPackPatch(preset EditorExportPreset.Instance, debug bool, path string, patches []string, flags EditorExportPlatform.DebugFlags) error
	// Optional.
	//
	// Create a ZIP archive at 'path' for the specified 'preset', containing only the files that have changed since the last patch.
	//
	// This method is called when "Export PCK/ZIP" button is pressed in the export dialog, with "Export as Patch" enabled, and ZIP is selected as a file type.
	//
	// Note: The patches provided in 'patches' have already been loaded when this method is called and are merely provided as context. When empty the patches defined in the export preset have been loaded instead.
	ExportZipPatch(preset EditorExportPreset.Instance, debug bool, path string, patches []string, flags EditorExportPlatform.DebugFlags) error
	// Required.
	//
	// Returns array of platform specific features.
	GetPlatformFeatures() []string
	// Optional.
	//
	// Returns protocol used for remote debugging. Default implementation return tcp://.
	GetDebugProtocol() string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL