Help GDExtension binding method

Godot Version

4.2.1

Question

Any one can explain me why this code generated error


void MyClassCPP::_bind_methods(){
    ClassDB::bind_method(D_METHOD("test", "p_arr"), &MyClassCPP::test);
}


void MyClassCPP::test(const PackedInt32Array &p_arr){
    //...
}

What is the error?

I can’t build it. It works just fine if I use other type like Image, but not for array. I want to modify PackedInt32 variable from gdscript in CPP. If I replace PackedInt32 with Ref<Image> it works and I can build it.