Browse Source

Added support for Shadows checkbox in Unity exporter

David Catuhe 9 years ago
parent
commit
bc9a8fabd4
1 changed files with 5 additions and 2 deletions
  1. 5 2
      Exporters/Unity 5/Unity3D2Babylon/SceneBuilder.Lights.cs

+ 5 - 2
Exporters/Unity 5/Unity3D2Babylon/SceneBuilder.Lights.cs

@@ -93,9 +93,12 @@ namespace Unity3D2Babylon
             ExportAnimations(light.transform, babylonLight);
 
             // Shadows
-            if ((light.type == LightType.Directional || light.type == LightType.Spot) && light.shadows != LightShadows.None)
+            if (exportationOptions.ExportShadows)
             {
-                GenerateShadowsGenerator(light);
+                if ((light.type == LightType.Directional || light.type == LightType.Spot) && light.shadows != LightShadows.None)
+                {
+                    GenerateShadowsGenerator(light);
+                }
             }
         }
     }