godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.15k stars 20.21k forks source link

Exported TileSets on non-TileMaps error with `Condition "!tile_set.is_valid()" is true." when edited #87348

Open otonashixav opened 8 months ago

otonashixav commented 8 months ago

Tested versions

System information

Godot v4.3.dev2 - Windows 10.0.19045 - Vulkan (Forward+ & Mobile) - dedicated NVIDIA GeForce GTX 970 (NVIDIA; 31.0.15.3667) - Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz (12 Threads)

Issue description

The issue title. The exact error message is:

editor/plugins/tiles/tile_set_editor.cpp:244 - Condition "!tile_set.is_valid()" is true.

There should be no error.

Steps to reproduce

  1. Create any Node
  2. Add a script that exports a TileSet var
  3. Give it a TileSet
  4. Add a source (icon.svg)
  5. Close and reopen the TileSet editor, e.g. by deselecting and reselecting the node
  6. editor/plugins/tiles/tile_set_editor.cpp:244 - Condition "!tile_set.is_valid()" is true.

Minimal reproduction project (MRP)

repro4.3 dev2.zip repro4.2.1.zip

aziomo commented 4 months ago

The issue is occurring on TileMaps and their TileSets as well, perhaps you could consider editing the title because of that?

What I found interesting (and somewhat of a band-aid for now) is that the error prints only when the tileset is expanded in tilemap's/node's inspector. When you close it, the error seems to no longer show up.