mirror of
https://github.com/godotengine/godot-cpp.git
synced 2026-01-01 05:48:37 +03:00
Fix missing MAKE_TYPED_ARRAY_INFO for Packed*Arrays
This commit is contained in:
@@ -204,6 +204,7 @@ void Example::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("test_str_utility"), &Example::test_str_utility);
|
||||
ClassDB::bind_method(D_METHOD("test_string_is_forty_two"), &Example::test_string_is_forty_two);
|
||||
ClassDB::bind_method(D_METHOD("test_string_resize"), &Example::test_string_resize);
|
||||
ClassDB::bind_method(D_METHOD("test_typed_array_of_packed"), &Example::test_typed_array_of_packed);
|
||||
ClassDB::bind_method(D_METHOD("test_vector_ops"), &Example::test_vector_ops);
|
||||
ClassDB::bind_method(D_METHOD("test_vector_init_list"), &Example::test_vector_init_list);
|
||||
|
||||
@@ -424,6 +425,19 @@ String Example::test_string_resize(String p_string) const {
|
||||
return p_string;
|
||||
}
|
||||
|
||||
TypedArray<PackedInt32Array> Example::test_typed_array_of_packed() const {
|
||||
TypedArray<PackedInt32Array> arr;
|
||||
PackedInt32Array packed_arr1;
|
||||
packed_arr1.push_back(1);
|
||||
packed_arr1.push_back(2);
|
||||
arr.push_back(packed_arr1);
|
||||
PackedInt32Array packed_arr2;
|
||||
packed_arr2.push_back(3);
|
||||
packed_arr2.push_back(4);
|
||||
arr.push_back(packed_arr2);
|
||||
return arr;
|
||||
}
|
||||
|
||||
int Example::test_vector_ops() const {
|
||||
PackedInt32Array arr;
|
||||
arr.push_back(10);
|
||||
|
||||
@@ -134,6 +134,7 @@ public:
|
||||
String test_str_utility() const;
|
||||
bool test_string_is_forty_two(const String &p_str) const;
|
||||
String test_string_resize(String p_original) const;
|
||||
TypedArray<PackedInt32Array> test_typed_array_of_packed() const;
|
||||
int test_vector_ops() const;
|
||||
int test_vector_init_list() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user