diff options
Diffstat (limited to 'editor/plugins/tiles/tiles_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/tiles/tiles_editor_plugin.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/editor/plugins/tiles/tiles_editor_plugin.cpp b/editor/plugins/tiles/tiles_editor_plugin.cpp index 543304346e..419d0ffcfc 100644 --- a/editor/plugins/tiles/tiles_editor_plugin.cpp +++ b/editor/plugins/tiles/tiles_editor_plugin.cpp @@ -121,12 +121,9 @@ void TilesEditorPlugin::_thread() { pattern_preview_done.wait(); Ref<Image> image = viewport->get_texture()->get_image(); - Ref<ImageTexture> image_texture; - image_texture.instantiate(); - image_texture->create_from_image(image); // Find the index for the given pattern. TODO: optimize. - Variant args[] = { item.pattern, image_texture }; + Variant args[] = { item.pattern, ImageTexture::create_from_image(image) }; const Variant *args_ptr[] = { &args[0], &args[1] }; Variant r; Callable::CallError error; |