ScriptEditor
Godot editor’s script editor.
ScriptEditor.swift:26class ScriptEditor
Godot editor’s script editor.
This object emits the following signals:
Superclasses
class PanelContainer
A container that keeps its child controls within the area of a
StyleBox
.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Types
class Signal1
Signal support.
class Signal2
Signal support.
Type members
Instance members
var editorScriptChanged: Signal1
Emitted when user changed active script. Argument is a freshly activated
Script
.var scriptClose: Signal2
Emitted when editor is about to close the active script. Argument is a
Script
that is going to be closed.func getCurrentEditor(
) -> ScriptEditorBase? Returns the
ScriptEditorBase
object that the user is currently editing.func getCurrentScript(
) -> Script? Returns a
Script
that is currently active in editor.func getOpenScriptEditors(
) -> ObjectCollection<ScriptEditorBase> Returns an array with all
ScriptEditorBase
objects which are currently open in editor.func getOpenScripts(
) -> ObjectCollection<Script> Returns an array with all
Script
objects which are currently open in editor.func gotoHelp(topic: String
) Opens help for the given topic. The
topic
is an encoded string that controls which class, method, constant, signal, annotation, property, or theme item should be focused.func gotoLine(lineNumber: Int32
) Goes to the specified line in the current script.
func openScriptCreateDialog(baseName: String, basePath: String
) Opens the script create dialog. The script will extend
baseName
. The file extension can be omitted frombasePath
. It will be added based on the selected scripting language.func registerSyntaxHighlighter(EditorSyntaxHighlighter?
) Registers the
EditorSyntaxHighlighter
to the editor, theEditorSyntaxHighlighter
will be available on all open scripts.func unregisterSyntaxHighlighter(EditorSyntaxHighlighter?
) Unregisters the
EditorSyntaxHighlighter
from the editor.