Exemplo n.º 1
0
 void OnDestroy()
 {
     HxVolumetricCamera.AllDensityVolumes.Remove(this);
     if (DensityOctree != null)
     {
         DensityOctree.Remove(this);
         DensityOctree = null;
     }
 }
Exemplo n.º 2
0
 // Use this for initialization
 void OnEnable()
 {
     CalculateBounds();
     if (DensityOctree == null)
     {
         DensityOctree = new HxOctree <HxDensityVolume>();
     }
     HxVolumetricCamera.AllDensityVolumes.Add(this);
     octreeNode = DensityOctree.Add(this, minBounds, maxBounds);
 }