When a project is launched, there is a starting scene with existing entities.
Now, when a new scene is loaded with code, I need an event for when an entity is created in that scene. For example: this.app.on("sceneEntityCreated", (entity) => {}, this);
Additionally, I need an event for when a new entity is created somewhere in the scene using new pc.Entity(). For example: this.app.on("newEntityCreated", (entity) => {}, this);
How can I obtain information about newly created entities on the scene?
It likely would be, but it’s not simple - often you’d want this to be called after all components are initialized and so on … not directly from the constructor, and that creates complexity.
Walking over the scene entities compared to that is easy. You could even keep a Set of known entities to filter those out.