Add a descriptive error message when creating a mesh surface from arrays
This commit is contained in:
parent
d76c1d0e51
commit
7d5b902838
|
@ -1193,7 +1193,7 @@ Error RenderingServer::mesh_create_surface_data_from_arrays(SurfaceData *r_surfa
|
||||||
array_len = v3.size();
|
array_len = v3.size();
|
||||||
} break;
|
} break;
|
||||||
default: {
|
default: {
|
||||||
ERR_FAIL_V(ERR_INVALID_DATA);
|
ERR_FAIL_V_MSG(ERR_INVALID_DATA, "Vertex array must be a PackedVector2Array or PackedVector3Array.");
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
ERR_FAIL_COND_V(array_len == 0, ERR_INVALID_DATA);
|
ERR_FAIL_COND_V(array_len == 0, ERR_INVALID_DATA);
|
||||||
|
@ -1214,7 +1214,7 @@ Error RenderingServer::mesh_create_surface_data_from_arrays(SurfaceData *r_surfa
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
default: {
|
default: {
|
||||||
ERR_FAIL_V(ERR_INVALID_DATA);
|
ERR_FAIL_V_MSG(ERR_INVALID_DATA, "Bones array must be a PackedInt32Array.");
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
} else if (i == RS::ARRAY_INDEX) {
|
} else if (i == RS::ARRAY_INDEX) {
|
||||||
|
|
Loading…
Reference in New Issue