Browse Source

[LIGHT PROBE] Missing dispose.

clementlandrin 3 years ago
parent
commit
3d5da8781b
1 changed files with 5 additions and 0 deletions
  1. 5 0
      hrt/prefab/vlm/LightProbe.hx

+ 5 - 0
hrt/prefab/vlm/LightProbe.hx

@@ -123,6 +123,11 @@ class LightProbeObject extends h3d.scene.Mesh {
 		}
 	}
 
+	override function onRemove() {
+		super.onRemove();
+		env.dispose();
+	}
+
 	override function emit( ctx : h3d.scene.RenderContext ) {
 
 		if( env == null || env.diffuse == null || env.specular == null )