----------------------------------- AtmosphereInit::OnComponentAdded Register atmospheres in the render scene when they are added to the ECS
| 20 | // Register atmospheres in the render scene when they are added to the ECS |
| 21 | // |
| 22 | void AtmosphereInit::OnComponentAdded(EcsController& controller, AtmosphereComponent& component, T_EntityId const entity) |
| 23 | { |
| 24 | render::AtmosphereInstance atmoInst; |
| 25 | atmoInst.atmosphereId = component.m_AssetId; |
| 26 | atmoInst.nodeId = controller.GetComponent<TransformComponent>(entity).GetNodeId(); |
| 27 | atmoInst.height = component.m_Height; |
| 28 | atmoInst.groundRadius = component.m_GroundHeight; |
| 29 | |
| 30 | component.m_RenderId = UnifiedScene::Instance().GetRenderScene().AddAtmosphere(atmoInst); |
| 31 | } |
| 32 | |
| 33 | //------------------------------------- |
| 34 | // AtmosphereInit::OnComponentRemoved |
nothing calls this directly
no test coverage detected