In the inspector, it will show the boxes for the values:
But I can't edit them, instead getting this output:
Set numCol
core/object/class_db.cpp:1642 - Instantiated Node3D used as default value for HexMap's "numCol" property.
core/object/class_db.cpp:1642 - Instantiated Node3D used as default value for HexMap's "numCol" property.
Here's the _bind_methods() function:
void HexMap::_bind_methods() {
ClassDB::bind_method(D_METHOD("setNumCol", "p_numCol"), &HexMap::setCameraRig);
ClassDB::bind_method(D_METHOD("getNumCol"), &HexMap::getCameraRig);
ADD_PROPERTY(PropertyInfo(Variant::INT, "numCol"), "setNumCol", "getNumCol");
ClassDB::bind_method(D_METHOD("setNumRow", "p_numRow"), &HexMap::setCameraRig);
ClassDB::bind_method(D_METHOD("getNumRow"), &HexMap::getCameraRig);
ADD_PROPERTY(PropertyInfo(Variant::INT, "numRow"), "setNumRow", "getNumRow");
ClassDB::bind_method(D_METHOD("setCameraRig", "p_cameraRig"), &HexMap::setCameraRig);
ClassDB::bind_method(D_METHOD("getCameraRig"), &HexMap::getCameraRig);
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "cameraRig"), "setCameraRig", "getCameraRig");
ClassDB::bind_method(D_METHOD("checkAndWrapHex", "hexCell"), &HexMap::checkAndWrapHex);
}
Here''s the implementation of the getters and setters:
public:
void setCameraRig(Node3D* p_cameraRig) { this->cameraRig = p_cameraRig; }
Node3D* getCameraRig() { return cameraRig; }
void setNumCol(int p_numCol) { this->numCol = p_numCol; }
int getNumCol() { return numCol; }
void setNumRow(int p_numRow) { this->numRow = p_numRow; }
int getNumRow() { return numRow; }