Explorar o código

[LIGHT PROBE] Missing dispose.

clementlandrin %!s(int64=3) %!d(string=hai) anos
pai
achega
3d5da8781b
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  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 )