Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a descriptive error message when creating a mesh surface from the wrong array type #85646

Merged
merged 1 commit into from
Dec 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions servers/rendering_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,7 @@ Error RenderingServer::mesh_create_surface_data_from_arrays(SurfaceData *r_surfa
array_len = v3.size();
} break;
default: {
ERR_FAIL_V(ERR_INVALID_DATA);
ERR_FAIL_V_MSG(ERR_INVALID_DATA, "Vertex array must be a PackedVector2Array or PackedVector3Array.");
} break;
}
ERR_FAIL_COND_V(array_len == 0, ERR_INVALID_DATA);
Expand All @@ -1214,7 +1214,7 @@ Error RenderingServer::mesh_create_surface_data_from_arrays(SurfaceData *r_surfa
}
} break;
default: {
ERR_FAIL_V(ERR_INVALID_DATA);
ERR_FAIL_V_MSG(ERR_INVALID_DATA, "Bones array must be a PackedInt32Array.");
} break;
}
} else if (i == RS::ARRAY_INDEX) {
Expand Down
Loading