0 votes

I created some scenes with a plugin.
But I can't make the editor to open it after the creation. If I open it with the Scene -> Open Scene menu works ok.

I tried:
1

var editor = EditorPlugin.new()
editor.edit(load(scene_path))

2

var editor = EditorPlugin.new()
editor.edit_resource(load(scene_path))

3

item = preload("res://addons/Easycoria/templates/item_animated.tscn").instance()
var editor = EditorPlugin.new()
editor.edit_resource(item)

And the editor doesn't do anything. With edit_resource I get no error, but no visible behavior. When I tried with edit rather than edit_resource it says:

SCRIPT ERROR: _on_ConfirmationDialog_confirmed: Invalid call. Nonexistent function 'edit' in base 'EditorPlugin'.

Maybe is a bug in the EditorPlugin? I work with the 2.1.3 stable version.

asked Jun 22 in Engine by vmpajares (17 points)
edited Jun 22 by vmpajares

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.