Bläddra i källkod

- Fix volumetric lightmap prefab init

ShiroSmith 7 år sedan
förälder
incheckning
7799fd9f93
1 ändrade filer med 3 tillägg och 7 borttagningar
  1. 3 7
      hide/prefab/l3d/VolumetricLightmap.hx

+ 3 - 7
hide/prefab/l3d/VolumetricLightmap.hx

@@ -48,7 +48,6 @@ class VolumetricLightmap extends Object3D {
 	}
 
 	function initProbes(){
-		volumetricLightmap.updateProbeCount();
 		createDebugPreview();
 	}
 
@@ -161,10 +160,6 @@ class VolumetricLightmap extends Object3D {
 		ctx.local3d.name = name;
 		applyPos(ctx.local3d);
 
-		#if editor
-		initProbes();
-		#end
-
 		volumetricLightmap.voxelSize = new h3d.Vector(voxelsize_x,voxelsize_y,voxelsize_z);
 		volumetricLightmap.shOrder = order;
 		volumetricLightmap.useAlignedProb = false;
@@ -172,8 +167,9 @@ class VolumetricLightmap extends Object3D {
 		var bytes = ctx.shared.loadBakedBytes(name+".vlm");
 		if( bytes != null ) volumetricLightmap.load(bytes);
 
-
-
+		#if editor
+		initProbes();
+		#end
 		return ctx;
 	}