Browse Source

[LIGHT PROBE] Missing dispose.

clementlandrin 3 năm trước cách đây
mục cha
commit
3d5da8781b
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  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 )