You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 19:41:11 +00:00
Change 'find_node' to 'find_nodes' and Add 'type' parameter
Changed 'find_node' to 'find_nodes' which now returns an 'TypedArray<Node>', as well as Added a 'type' parameter to match against specific node types, which supports inheritance.
This commit is contained in:
@@ -377,9 +377,10 @@ void SceneImportSettings::_update_view_gizmos() {
|
||||
continue;
|
||||
}
|
||||
|
||||
MeshInstance3D *collider_view = static_cast<MeshInstance3D *>(mesh_node->find_node("collider_view"));
|
||||
CRASH_COND_MSG(collider_view == nullptr, "This is unreachable, since the collider view is always created even when the collision is not used! If this is triggered there is a bug on the function `_fill_scene`.");
|
||||
TypedArray<Node> descendants = mesh_node->find_nodes("collider_view", "MeshInstance3D");
|
||||
CRASH_COND_MSG(descendants.is_empty(), "This is unreachable, since the collider view is always created even when the collision is not used! If this is triggered there is a bug on the function `_fill_scene`.");
|
||||
|
||||
MeshInstance3D *collider_view = static_cast<MeshInstance3D *>(descendants[0].operator Object *());
|
||||
collider_view->set_visible(generate_collider);
|
||||
if (generate_collider) {
|
||||
// This collider_view doesn't have a mesh so we need to generate a new one.
|
||||
|
||||
Reference in New Issue
Block a user