Fix rendering of custom actors lists in Editor viewports

This commit is contained in:
Wojtek Figat
2022-11-16 09:57:17 +01:00
parent 20661fc902
commit 16ebc72099
26 changed files with 118 additions and 178 deletions

View File

@@ -71,28 +71,6 @@ bool DirectionalLight::IntersectsItself(const Ray& ray, Real& distance, Vector3&
return false;
}
void DirectionalLight::OnEnable()
{
GetSceneRendering()->AddActor(this, _sceneRenderingKey, SceneRendering::PreRender);
#if USE_EDITOR
GetSceneRendering()->AddViewportIcon(this);
#endif
// Base
LightWithShadow::OnEnable();
}
void DirectionalLight::OnDisable()
{
#if USE_EDITOR
GetSceneRendering()->RemoveViewportIcon(this);
#endif
GetSceneRendering()->RemoveActor(this, _sceneRenderingKey, SceneRendering::PreRender);
// Base
LightWithShadow::OnDisable();
}
void DirectionalLight::OnTransformChanged()
{
// Base