Skip to content

A simple plugin that allows calling methods prefixed with `__EDITOR__FNC_` in a tool script from the Godot's editor

Notifications You must be signed in to change notification settings

m4nu3lf/godot_editor_call_my_method

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Editor call my method

A simple plugin that allows calling methods prefixed with __EDITOR__FNC_ in a tool script from the editor.

A menu will show up for the selected node/resource if it contains prefixed methods. Selecting an entry will cause the method to be called.

Additionally, a tool script can expose the method __EDITOR_OUT__that must return a string. The method will be called every frame, and the output will be shown in a label in the editor, useful for tool scripts that can change state.

Example:

tool
extends Node

var value: int = 0


func __EDITOR_FNC__increment() -> void:
	value += 1


func __EDITOR_OUT__() -> String:
	return str(value)

About

A simple plugin that allows calling methods prefixed with `__EDITOR__FNC_` in a tool script from the Godot's editor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published