mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-26 17:30:09 +01:00
Made a new material IO plugin because the old one wasn't working. The new material IO plugin uses JSON instead of a custom resource because you currently cannot save custom resources from GDScript.
23 lines
403 B
GDScript
23 lines
403 B
GDScript
tool
|
|
extends EditorPlugin
|
|
|
|
var dock = null
|
|
|
|
func _enter_tree():
|
|
# When this plugin node enters tree, add the custom type
|
|
|
|
dock = preload("res://addons/custom_dock/custom_dock.scn").instance()
|
|
|
|
add_control_to_dock( DOCK_SLOT_LEFT_UL, dock )
|
|
|
|
func _exit_tree():
|
|
|
|
# Remove from docks (must be called so layout is updated and saved)
|
|
remove_control_from_docks(dock)
|
|
# Remove the node
|
|
dock.free()
|
|
|
|
|
|
|
|
|
|
|