godotengine / godotengine/godot-cpp
[GODOT 4] How to show children nodes in editor ?
- Dominant language
- C++
- Stars
- 2.7k
- Forks
- 809
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 8
Description
Hi!
I created a godot::MeshInstance3D and added as a child in the constructor of my class like this:
```cpp
class MyCustomNode : public godot::Node3D {
GDCLASS(MyCustomNode, godot::Node3D)
public:
MyCustomNode();
~MyCustomNode() = default;
protected:
static void _bind_methods();
private:
godot::MeshInstance3D *pMeshInstance = nullptr;
};
```
```cpp
MyCustomNode::MyCustomNode() {
pMeshInstance = memnew(godot::MeshInstance3D);
pMeshInstance->set_name("test child");
pMeshInstance->set_visible(true);
add_child(pMeshInstance);
pMeshInstance->set_owner(this);
set_editable_instance(pMeshInstance, true);
}
```
In the editor I just see "MyCustomNode" ..... why ? how I can show the children with their properties ?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.