Hello, I would like to create an EditorPlugin that displays a scene when clicking on a MenuItem. Here is the code:
private void OnMenuSelected(long id)
{
PackedScene packedScene = new PackedScene();
packedScene.ResourceName = spriteName;
packedScene.Pack(new Node2D{
Name = "Test",
});
EditorInterface.Singleton.EditResource(packedScene);
}
But this is not working.