playcanvas / playcanvas/engine

Engine generated graph nodes in entities (eg elements) causing issues with children length

Open
#4,333 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.