engine
engine copied to clipboard
Multi app fix
Fixes #6388 Fixes #6309
- Wraps add app in async function so can await on app creation
- Passed in application when creating entity (See below for explanation)
The application passed into the entity is used to register new component systems of which one is the CameraComponent. The camera component's layers are then used to construct the render passes. If there is an existing application the current application reference will be set to the first application every update frame. Therefore if you construct a new application without starting it and create a new entity it will use the first application reference and in turn render using its graphics device in turn.