Check for the VERSION_MAJOR define instead of the GODOT4.

This commit is contained in:
Relintai 2021-08-17 20:03:57 +02:00
parent 2e4ab17d2e
commit 3c3e057182

View File

@ -186,7 +186,7 @@ void TiledWall::clear_mesh() {
if (_mesh_rid != RID()) {
if (VS::get_singleton()->mesh_get_surface_count(_mesh_rid) > 0)
#if !GODOT4
#if VERSION_MAJOR < 4
VS::get_singleton()->mesh_remove_surface(_mesh_rid, 0);
#else
VS::get_singleton()->mesh_clear(_mesh_rid);