playcanvas / playcanvas/engine
Engine generated graph nodes in entities (eg elements) causing issues with children length
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 16.8k
- Forks
- 2k
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 222
Description
Related to: https://github.com/playcanvas/engine/issues/1660
A user had an issue where some logic was dependent on the number of children that an element entity had.
Because a graph node is created by the engine for the mesh, the count was always off by one and took some time to work out that there was an extra graphnode that's not shown in the Editor but was created at runtime.
The proposal here is that we have a new API that only has the children that are entities unless anyone has other ideas to tackle this.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading related issue #1660 and reproducing the reported mismatch between an element entity's children length and the Editor-visible children. Then inspect the runtime graph-node and entity-child APIs to determine the proposed entity-only view; done means callers can count entity children without engine-generated mesh nodes affecting the result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100