diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2023-02-11 02:18:10 -0600 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2023-02-11 02:18:10 -0600 |
commit | be916233f9022cb527cd053339102e141497761f (patch) | |
tree | 7467644ee218755a48e08925b7a302ef35ddd976 /scene/resources | |
parent | 9f6bb7dd50efd385fda6bc5eeb7dcac1857c48ad (diff) |
Check for CanvasItem instead of Control and Node2D
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/tile_set.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp index 58a638804d..fee0a4a910 100644 --- a/scene/resources/tile_set.cpp +++ b/scene/resources/tile_set.cpp @@ -4805,8 +4805,8 @@ void TileSetScenesCollectionSource::set_scene_tile_scene(int p_id, Ref<PackedSce scene_state = scene_state->get_base_scene_state(); } ERR_FAIL_COND_MSG(type.is_empty(), vformat("Invalid PackedScene for TileSetScenesCollectionSource: %s. Could not get the type of the root node.", p_packed_scene->get_path())); - bool extends_correct_class = ClassDB::is_parent_class(type, "Control") || ClassDB::is_parent_class(type, "Node2D"); - ERR_FAIL_COND_MSG(!extends_correct_class, vformat("Invalid PackedScene for TileSetScenesCollectionSource: %s. Root node should extend Control or Node2D. Found %s instead.", p_packed_scene->get_path(), type)); + bool extends_correct_class = ClassDB::is_parent_class(type, "CanvasItem"); + ERR_FAIL_COND_MSG(!extends_correct_class, vformat("Invalid PackedScene for TileSetScenesCollectionSource: %s. Root node should extend CanvasItem. Found %s instead.", p_packed_scene->get_path(), type)); scenes[p_id].scene = p_packed_scene; } else { |