GodotSharpEditor
Virtual method to be overridden by the user. It is called when the export starts and provides all information about the export.
Virtual method to be overridden by the user. Called when the export is finished.
An editor feature profile can be used to disable specific features of the Godot editor. When disabled, the features won't appear in the editor, which makes the editor less cluttered. This is useful in education settings to reduce confusion or when working in a team. For example, artists and level designers could use a feature profile that disables the script editor to avoid accidentally making changes to files they aren't supposed to edit.
To manage editor feature profiles visually, use Editor > Manage Feature Profiles... at the top of the editor window.
The 3D editor. If this feature is disabled, the 3D editor won't display but 3D nodes will still display in the Create New Node dialog.
The Script tab, which contains the script editor and class reference browser. If this feature is disabled, the Script tab won't display.
The AssetLib tab. If this feature is disabled, the AssetLib tab won't display.
Scene tree editing. If this feature is disabled, the Scene tree dock will still be visible but will be read-only.
The Import dock. If this feature is disabled, the Import dock won't be visible.
The Node dock. If this feature is disabled, signals and groups won't be visible and modifiable from the editor.
The FileSystem dock. If this feature is disabled, the FileSystem dock won't be visible.
Represents the size of the enum.
If disable is true, disables the class specified by class_name. When disabled, the class won't appear in the Create New Node dialog.
Returns true if the class specified by class_name is disabled. When disabled, the class won't appear in the Create New Node dialog.
If disable is true, disables editing for the class specified by class_name. When disabled, the class will still appear in the Create New Node dialog but the inspector will be read-only when selecting a node that extends the class.
Returns true if editing for the class specified by class_name is disabled. When disabled, the class will still appear in the Create New Node dialog but the inspector will be read-only when selecting a node that extends the class.
If disable is true, disables editing for property in the class specified by class_name. When a property is disabled, it won't appear in the inspector when selecting a node that extends the class specified by class_name.
Returns true if property is disabled in the class specified by class_name. When a property is disabled, it won't appear in the inspector when selecting a node that extends the class specified by class_name.
If disable is true, disables the editor feature specified in feature. When a feature is disabled, it will disappear from the editor entirely.
Returns true if the feature is disabled. When a feature is disabled, it will disappear from the editor entirely.
Returns the specified feature's human-readable name.
Saves the editor feature profile to a file in JSON format. It can then be imported using the feature profile manager's Import button or the button.
Loads an editor feature profile from a file. The file must follow the JSON format obtained by using the feature profile manager's Export button or the method.
The displays resources as thumbnails.
The displays resources as a list of filenames.
The can select only one file. Accepting the window will open the file.
The can select multiple files. Accepting the window will open all files.
The can select only one directory. Accepting the window will open the directory.
The can select a file or directory. Accepting the window will open it.
The can select only one file. Accepting the window will save the file.
The can only view res:// directory contents.
The can only view user:// directory contents.
The can view the entire local file system.
The location from which the user may select a file, including res://, user://, and the local file system.
The view format in which the displays resources to the user.
The purpose of the , which defines the allowed behaviors.
The currently occupied directory.
The currently selected file.
The file system path in the address bar.
If true, hidden files and directories will be visible in the .
If true, the will not warn the user before overwriting files.
Removes all filters except for "All Files (*)".
Adds a comma-delimited file extension filter option to the with an optional semi-colon-delimited label.
For example, "*.tscn, *.scn; Scenes" results in filter text "Scenes (*.tscn, *.scn)".
Returns the VBoxContainer used to display the file system.
Notify the that its view of the data is no longer accurate. Updates the view contents on next view update.
This object holds information of all resources in the filesystem, their types, etc.
Note: This class shouldn't be instantiated directly. Instead, access the singleton using .
Gets the root directory object.
Returns true of the filesystem is being scanned.
Returns the scan progress for 0 to 1 if the FS is being scanned.
Scan the filesystem for changes.
Check if the source of any imported resource changed.
Update a file information. Call this if an external program (not Godot) modified the file.
Returns a view into the filesystem at path.
Gets the type of the file, given the full path.
Scans the script files and updates the list of custom class names.
A more generalized, low-level variation of the directory concept.
Returns the number of subdirectories in this directory.
Returns the subdirectory at index idx.
Returns the number of files in this directory.
Returns the name of the file at index idx.
Returns the path to the file at index idx.
Returns the file extension of the file at index idx.
Returns true if the file at index idx imported properly.
Returns the name of this directory.
Returns the path to this directory.
Returns the parent directory for this directory or null if called on a directory at res:// or user://.
Returns the index of the file with name name or -1 if not found.
Returns the index of the directory with name name or -1 if not found.
EditorImportPlugins provide a way to extend the editor's resource import functionality. Use them to import resources from custom files or to provide alternatives to the editor's existing importers. Register your with .
EditorImportPlugins work by associating with specific file extensions and a resource type. See and . They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the .import directory.
Below is an example EditorImportPlugin that imports a from a file with the extension ".special" or ".spec":
tool
extends EditorImportPlugin
func get_importer_name():
return "my.special.plugin"
func get_visible_name():
return "Special Mesh Importer"
func get_recognized_extensions():
return ["special", "spec"]
func get_save_extension():
return "mesh"
func get_resource_type():
return "Mesh"
func get_preset_count():
return 1
func get_preset_name(i):
return "Default"
func get_import_options(i):
return [{"name": "my_option", "default_value": false}]
func import(source_file, save_path, options, platform_variants, gen_files):
var file = File.new()
if file.open(source_file, File.READ) != OK:
return FAILED
var mesh = Mesh.new()
# Fill the Mesh with data read in "file", left as an exercise to the reader
var filename = save_path + "." + get_save_extension()
ResourceSaver.save(filename, mesh)
return OK
Gets the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: name, default_value, property_hint (optional), hint_string (optional), usage (optional).
Gets the order of this importer to be run when importing resources. Higher values will be called later. Use this to ensure the importer runs after the dependencies are already imported.
Gets the unique name of the importer.
Gets the number of initial presets defined by the plugin. Use to get the default options for the preset and to get the name of the preset.
Gets the name of the options preset at this index.
Gets the priority of this plugin for the recognized extension. Higher priority plugins will be preferred. The default priority is 1.0.
Gets the list of file extensions to associate with this loader (case-insensitive). e.g. ["obj"].
Gets the Godot resource type associated with this loader. e.g. "Mesh" or "Animation".
Gets the extension used to save this resource in the .import directory.
Gets the name to display in the import window.
The editor inspector is by default located on the right-hand side of the editor. It's used to edit the properties of the selected node. For example, you can select a node such as then edit its transform through the inspector tool. The editor inspector is an essential tool in the game development workflow.
Note: This class shouldn't be instantiated directly. Instead, access the singleton using .
This plugins allows adding custom property editors to .
Plugins are registered via .
When an object is edited, the function is called and must return true if the object type is supported.
If supported, the function will be called, allowing to place custom controls at the beginning of the class.
Subsequently, the and are called for every category and property. They offer the ability to add custom controls to the inspector too.
Finally will be called.
On each of these calls, the "add" functions can be called.
Returns true if this object can be handled by this plugin.
Called to allow adding controls at the beginning of the list.
Called to allow adding controls at the beginning of the category.
Called to allow adding controls at the end of the list.
Called to allow adding property specific editors to the inspector. Usually these inherit . Returning true removes the built-in editor for this property, otherwise allows to insert a custom editor before the built-in one.
Adds a custom control, not necessarily a property editor.
Adds a property editor, this must inherit .
Adds an editor that allows modifying multiple properties, this must inherit .
EditorInterface gives you control over Godot editor's window. It allows customizing the window, saving and (re-)loading scenes, rendering mesh previews, inspecting and editing resources and objects, and provides access to , , , , the editor viewport, and information about scenes.
Note: This class shouldn't be instantiated directly. Instead, access the singleton using .
Shows the given property on the given object in the Editor's Inspector dock.
Returns the .
Returns the .
Returns the .
Returns the main container of Godot editor's window. You can use it, for example, to retrieve the size of the container and place your controls accordingly.
Edits the given .
Opens the scene at the given path.
Reloads the scene at the given path.
Returns an with the file paths of the currently opened scenes.
Returns the edited (current) scene's root .
Returns the .
Returns the .
Returns the editor .
Returns mesh previews rendered at the given size as an of s.
Selects the file, with the path provided by file, in the FileSystem dock.
Sets the enabled status of a plugin. The plugin name is the same as its directory name.
Returns the enabled status of a plugin. The plugin name is the same as its directory name.
Saves the scene. Returns either OK or ERR_CANT_CREATE (see @GlobalScope constants).
Saves the scene as a file at path.
Plugins are used by the editor to extend functionality. The most common types of plugins are those which edit a given node or resource type, import plugins and export plugins. See also to add functions to the editor.
Represents the size of the enum.
This method is called when the editor is about to save the project, switch to another tab, etc. It asks the plugin to apply any pending state changes to ensure consistency.
This is used, for example, in shader editors to let the plugin know that it must apply the shader code being written by the user to the object.
Clear all the state and reset the object being edited to zero. This ensures your plugin does not keep editing a currently existing node, or a node from the wrong scene.
Called by the engine when the user disables the in the Plugin tab of the project settings window.
This function is used for plugins that edit specific object types (nodes or resources). It requests the editor to edit the given object.
Called by the engine when the user enables the in the Plugin tab of the project settings window.
Called when there is a root node in the current edited scene, is implemented and an happens in the 2D viewport. Intercepts the , if return true consumes the event, otherwise forwards event to other Editor classes. Example:
# Prevents the InputEvent to reach other Editor classes
func forward_canvas_gui_input(event):
var forward = true
return forward
Must return false in order to forward the to other Editor classes. Example:
# Consumes InputEventMouseMotion and forwards other InputEvent types
func forward_canvas_gui_input(event):
var forward = false
if event is InputEventMouseMotion:
forward = true
return forward
Called when there is a root node in the current edited scene, is implemented and an happens in the 3D viewport. Intercepts the , if return true consumes the event, otherwise forwards event to other Editor classes. Example:
# Prevents the InputEvent to reach other Editor classes
func forward_spatial_gui_input(camera, event):
var forward = true
return forward
Must return false in order to forward the to other Editor classes. Example:
# Consumes InputEventMouseMotion and forwards other InputEvent types
func forward_spatial_gui_input(camera, event):
var forward = false
if event is InputEventMouseMotion:
forward = true
return forward
This is for editors that edit script-based objects. You can return a list of breakpoints in the format (script:line), for example: res://path_to_script.gd:25.
Override this method in your plugin to return a in order to give it an icon.
For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons.
Ideally, the plugin icon should be white with a transparent background and 16x16 pixels in size.
func get_plugin_icon():
# You can use a custom icon:
return preload("res://addons/my_plugin/my_plugin_icon.svg")
# Or use a built-in icon:
return get_editor_interface().get_base_control().get_icon("Node", "EditorIcons")
Override this method in your plugin to provide the name of the plugin when displayed in the Godot editor.
For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons.
Gets the state of your plugin editor. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns).
Gets the GUI layout of the plugin. This is used to save the project's editor layout when is called or the editor layout was changed(For example changing the position of a dock).
Implement this function if your plugin edits a specific type of object (Resource or Node). If you return true, then you will get the functions and called when the editor requests them. If you have declared the methods and these will be called too.
Returns true if this is a main screen editor plugin (it goes in the workspace selector together with 2D, 3D, Script and AssetLib).
This function will be called when the editor is requested to become visible. It is used for plugins that edit a specific object type.
Remember that you have to manage the visibility of all your editor controls manually.
This method is called after the editor saves the project or when it's closed. It asks the plugin to save edited external scenes/resources.
Restore the state saved by .
Restore the plugin GUI layout saved by .
Adds a custom control to a container (see ). There are many locations where custom controls can be added in the editor UI.
Please remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it).
When your plugin is deactivated, make sure to remove your custom control with and free it with .
Adds a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with and free it with .
Adds the control to a specific dock slot (see for options).
If the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions.
When your plugin is deactivated, make sure to remove your custom control with and free it with .
Removes the control from the dock. You have to manually the control.
Removes the control from the bottom panel. You have to manually the control.
Removes the control from the specified container. You have to manually the control.
Adds a custom menu item to Project > Tools as name that calls callback on an instance of handler with a parameter ud when user activates it.
Adds a custom submenu under Project > Tools > name. submenu should be an object of class . This submenu should be cleaned up using remove_tool_menu_item(name).
Removes a menu name from Project > Tools.
Adds a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed.
When given node or resource is selected, the base type will be instanced (ie, "Spatial", "Control", "Resource"), then the script will be loaded and set to this object.
You can use the virtual method to check if your custom object is being edited by checking the script or using the is keyword.
During run-time, this will be a simple object with a script so this function does not need to be called then.
Removes a custom type added by .
Adds a script at path to the Autoload list as name.
Removes an Autoload name from the list.
Updates the overlays of the editor (2D/3D) viewport.
Gets the undo/redo object. Most actions in the editor can be undoable, so use this object to make sure this happens when it's worth it.
Queue save the project's editor layout.
Use this method if you always want to receive inputs from 3D view screen inside . It might be especially usable if your plugin will want to use raycast in the scene.
Returns the object that gives you control over Godot editor's window and its functionalities.
Gets the Editor's dialogue used for making scripts.
Note: Users can configure it before use.
This control allows property editing for one or multiple properties into . It is added via .
Sets this property to change the label (if you want to show one).
Used by the inspector, when the property is read-only.
Used by the inspector, set when property is checkable.
Used by the inspector, when the property is checked.
Used by the inspector, when the property must draw with error color.
Used by the inspector, when the property can add keys for animation.
When this virtual function is called, you must update your editor.
Gets the edited property. If your editor is for a single property (added via ), then this will return the property.
Gets the edited object.
Override if you want to allow a custom tooltip over your property.
If any of the controls added can gain keyboard focus, add it here. This ensures that focus will be restored if the inspector is refreshed.
Adds controls with this function if you want them on the bottom (below the label).
If one or several properties have changed, this must be called. field is used in case your editor can modify fields separately (as an example, Vector3.x). The changing argument avoids the editor requesting this property to be refreshed (leave as false if unsure).
This object is used to generate previews for resources of files.
Note: This class shouldn't be instantiated directly. Instead, access the singleton using .
Queue a resource file for preview (using a path). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty texture (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything.
Queue a resource being edited for preview (using an instance). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty texture (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything.
Create an own, custom preview generator.
Removes a custom preview generator.
Check if the resource changed, if so, it will be invalidated and the corresponding signal emitted.
Custom code to generate previews. Please check file_dialog/thumbnail_size in to find out the right size to do previews at.
If this function returns true, the generator will call or for small previews as well.
By default, it returns false.
Generate a preview from a given resource with the specified size. This must always be implemented.
Returning an empty texture is an OK way to fail and let another generator take care.
Care must be taken because this function is always called from a thread (not the main thread).
Generate a preview directly from a path with the specified size. Implementing this is optional, as default code will load and call .
Returning an empty texture is an OK way to fail and let another generator take care.
Care must be taken because this function is always called from a thread (not the main thread).
If this function returns true, the generator will automatically generate the small previews from the normal preview texture generated by the methods or .
By default, it returns false.
Returns true if your generator supports the resource of type type.
This is an FBX 3D asset importer based on Assimp. It currently has many known limitations and works best with static meshes. Most animated meshes won't import correctly.
If exporting a FBX scene from Autodesk Maya, use these FBX export settings:
- Smoothing Groups
- Smooth Mesh
- Triangluate (for meshes with blend shapes)
- Bake Animation
- Resample All
- Deformed Models
- Skins
- Blend Shapes
- Curve Filters
- Constant Key Reducer
- Auto Tangents Only
- *Do not check* Constraints (as it will break the file)
- Can check Embed Media (embeds textures into the exported FBX file)
- Note that when importing embedded media, the texture and mesh will be a single immutable file.
- You will have to re-export then re-import the FBX if the texture has changed.
- Units: Centimeters
- Up Axis: Y
- Binary format in FBX 2017
Imported scenes can be automatically modified right after import by setting their Custom Script Import property to a tool script that inherits from this class.
The callback receives the imported scene's root node and returns the modified version of the scene. Usage example:
tool # Needed so it runs in editor
extends EditorScenePostImport
# This sample changes all node names
# Called right after the scene is imported and gets the root node
func post_import(scene):
# Change all node names to "modified_[oldnodename]"
iterate(scene)
return scene # Remember to return the imported scene
func iterate(node):
if node != null:
node.name = "modified_" + node.name
for child in node.get_children():
iterate(child)
Called after the scene was imported. This method must return the modified version of the scene.
Returns the resource folder the imported scene file is located in.
Returns the source file path which got imported (e.g. res://scene.dae).
Scripts extending this class and implementing its method can be executed from the Script Editor's File > Run menu option (or by pressing Ctrl+Shift+X) while the editor is running. This is useful for adding custom in-editor functionality to Godot. For more complex additions, consider using s instead.
Note: Extending scripts need to have tool mode enabled.
Example script:
tool
extends EditorScript
func _run():
print("Hello from the Godot Editor!")
Note: The script is run in the Editor context, which means the output is visible in the console window started with the Editor (stdout) instead of the usual Godot Output dock.
This method is executed by the Editor when File > Run is used.
Adds node as a child of the root node in the editor context.
Warning: The implementation of this method is currently disabled.
Returns the Editor's currently active scene.
Returns the singleton instance.
This object manages the SceneTree selection in the editor.
Note: This class shouldn't be instantiated directly. Instead, access the singleton using .
Clear the selection.
Adds a node to the selection.
Removes a node from the selection.
Gets the list of selected nodes.
Gets the list of selected nodes, optimized for transform operations (i.e. moving them, rotating, etc). This list avoids situations where a node is selected and also child/grandchild.
Object that holds the project-independent editor settings. These settings are generally visible in the Editor > Editor Settings menu.
Accessing the settings is done by using the regular API, such as:
settings.set(prop,value)
settings.get(prop)
list_of_settings = settings.get_property_list()
Note: This class shouldn't be instantiated directly. Instead, access the singleton using .
Emitted when editor settings change. It used by various editor plugins to update their visuals on theme changes or logic on configuration changes.
Erase a given setting (pass full property path).
Adds a custom property info to a property. The dictionary must contain:
- name: (the name of the property)
- type: (see )
- optionally hint: (see ) and hint_string:
Example:
editor_settings.set("category/property_name", 0)
var property_info = {
"name": "category/property_name",
"type": TYPE_INT,
"hint": PROPERTY_HINT_ENUM,
"hint_string": "one,two,three"
}
editor_settings.add_property_info(property_info)
Gets the global settings path for the engine. Inside this path, you can find some standard paths such as:
settings/tmp - Used for temporary storage of files
settings/templates - Where export templates are located
Gets the specific project settings path. Projects all have a unique sub-directory inside the settings path where project specific settings are saved.
Sets the list of favorite files and directories for this project.
Gets the list of favorite files and directories for this project.
Sets the list of recently visited folders in the file dialog for this project.
Gets the list of recently visited folders in the file dialog for this project.
Custom gizmo that is used for providing custom visualization and editing (handles) for 3D Spatial objects. See for more information.
Commit a handle being edited (handles must have been previously added by ).
If the cancel parameter is true, an option to restore the edited value to the original is provided.
Gets the name of an edited handle (handles must have been previously added by ).
Handles can be named for reference to the user when editing.
Gets actual value of a handle. This value can be anything and used for eventually undoing the motion when calling .
Gets whether a handle is highlighted or not.
This function is called when the Spatial this gizmo refers to changes (the is called).
This function is used when the user drags a gizmo handle (previously added with ) in screen coordinates.
The is also provided so screen coordinates can be converted to raycasts.
Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this function during .
If the parameter is null, then the default value is new Color(1, 1, 1, 1)
Adds collision triangles to the gizmo for picking. A can be generated from a regular too. Call this function during .
Adds an unscaled billboard for visualization. Call this function during .
If the parameter is null, then the default value is new Color(1, 1, 1, 1)
Adds a list of handles (points) which can be used to deform the object being edited.
There are virtual functions which will be called upon editing of these handles. Call this function during .
Returns the Spatial node associated with this gizmo.
Returns the that owns this gizmo. It's useful to retrieve materials using .
EditorSpatialGizmoPlugin allows you to define a new type of Gizmo. There are two main ways to do so: extending for the simpler gizmos, or creating a new type. See the tutorial in the documentation for more info.
Override this method to define whether the gizmo can be hidden or not. Returns true if not overridden.
Override this method to commit gizmo handles. Called for this plugin's active gizmos.
Override this method to return a custom for the spatial nodes of your choice, return null for the rest of nodes. See also .
Override this method to provide gizmo's handle names. Called for this plugin's active gizmos.
Gets actual value of a handle from gizmo. Called for this plugin's active gizmos.
Override this method to provide the name that will appear in the gizmo visibility menu.
Override this method to define which Spatial nodes have a gizmo from this plugin. Whenever a node is added to a scene this method is called, if it returns true the node gets a generic assigned and is added to this plugin's list of active gizmos.
Gets whether a handle is highlighted or not. Called for this plugin's active gizmos.
Override this method to define whether Spatial with this gizmo should be selecteble even when the gizmo is hidden.
Callback to redraw the provided gizmo. Called for this plugin's active gizmos.
Update the value of a handle after it has been updated. Called for this plugin's active gizmos.
Creates an unshaded material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with and used in and . Should not be overridden.
Creates an icon material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with and used in . Should not be overridden.
If the parameter is null, then the default value is new Color(1, 1, 1, 1)
Creates a handle material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with and used in . Should not be overridden.
Adds a new material to the internal material list for the plugin. It can then be accessed with . Should not be overridden.
Gets material from the internal list of materials. If an is provided, it will try to get the corresponding variant (selected and/or editable).
Used by the editor to display VCS extracted information in the editor. The implementation of this API is included in VCS addons, which are essentially GDNative plugins that need to be put into the project folder. These VCS addons are scripts which are attached (on demand) to the object instance of EditorVCSInterface. All the functions listed below, instead of performing the task themselves, they call the internally defined functions in the VCS addons to provide a plug-n-play experience.
Returns true if the addon is ready to respond to function calls, else returns false.
Initializes the VCS addon if not already. Uses the argument value as the path to the working directory of the project. Creates the initial commit if required. Returns true if no failure occurs, else returns false.
Returns true if the VCS addon has been initialized, else returns false.
Returns a containing the path of the detected file change mapped to an integer signifying what kind of a change the corresponding file has experienced.
The following integer values are being used to signify that the detected file is:
- 0: New to the VCS working directory
- 1: Modified
- 2: Renamed
- 3: Deleted
- 4: Typechanged
Stages the file which should be committed when is called. Argument should contain the absolute path.
Unstages the file which was staged previously to be committed, so that it is no longer committed when is called. Argument should contain the absolute path.
Creates a version commit if the addon is initialized, else returns without doing anything. Uses the files which have been staged previously, with the commit message set to a value as provided as in the argument.
Returns an of objects containing the diff output from the VCS in use, if a VCS addon is initialized, else returns an empty object. The diff contents also consist of some contextual lines which provide context to the observed line change in the file.
Each object has the line diff contents under the keys:
- "content" to store a containing the line contents
- "status" to store a which contains "+" in case the content is a line addition but it stores a "-" in case of deletion and an empty string in the case the line content is neither an addition nor a deletion.
- "new_line_number" to store an integer containing the new line number of the line content.
- "line_count" to store an integer containing the number of lines in the line content.
- "old_line_number" to store an integer containing the old line number of the line content.
- "offset" to store the offset of the line change since the first contextual line content.
Shuts down the VCS addon to allow cleanup code to run on call. Returns true is no failure occurs, else returns false.
Returns the project name of the VCS working directory.
Returns the name of the VCS if the VCS has been initialized, else return an empty string.
The creates script files according to a given template for a given scripting language. The standard use is to configure its fields prior to calling one of the methods.
func _ready():
dialog.config("Node", "res://new_node.gd") # For in-engine types
dialog.config("\"res://base_node.gd\"", "res://derived_node.gd") # For script types
dialog.popup_centered()
Prefills required fields to configure the ScriptCreateDialog for use.
Note: This class shouldn't be instantiated directly. Instead, access the singleton using .
Goes to the specified line in the current script.
Returns a that is currently active in editor.
Returns an array with all objects which are currently open in editor.
Add a custom Visual Script node to the editor. It'll be placed under "Custom Nodes" with the category as the parameter.
Remove a custom Visual Script node from the editor. Custom nodes already placed on scripts won't be removed.