playcanvas / playcanvas/engine

Entity events

Open
#377 0 comments 0 reactions 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

Would be great to add events with such usability from script:
this.entity.on('remove', ...

Here is list of useful ones (name and [arguments]):

enable [ ] - entity is enabled (respects hierarchy)
disable [ ] - entity is disabled (respects hierarchy)
state [enabled] - entity is enabled/disabled (respects hierarchy)

inserted [parent] - entity is added as a child to another entity
removed [oldParent] - entity is removed from its parent

insert [childEntity] - other entity is added as child
remove [childEntity] - child entity is removed

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

No files, tests, or entry points are named. Start by locating the entity scripting API and its existing event conventions, then compare the requested enable, disable, state, inserted, removed, insert, and remove events with their proposed arguments. Done means the entity API supports the listed events with the specified hierarchy behavior and arguments.

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
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.