Skip to content

[BUG] GameObject.Traverse() does not return GameObjects where active=false #129

@saternius

Description

@saternius

Describe the bug
GameObject.Traverse() does not return GameObjects where active=false

To Reproduce
let stone = await scene.Find("gravestone");
stone .Traverse(x=>console.log(x))
let rock = await scene.Find("rock"); //rock is a child of stone
rock.setActive(false)
stone .Traverse(x=>console.log(x)) //rock is nowhere to be found anymore

Expected behavior
It should return inactive children regardless. Its always possible to filter(x=>x.active) to get the current behaviour, but is impossible to query for inactive children otherwise.

At the very least, a parameter should be added to include inactive children

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions