浏览代码

Added support for Shadows checkbox in Unity exporter

David Catuhe 9 年之前
父节点
当前提交
bc9a8fabd4
共有 1 个文件被更改,包括 5 次插入2 次删除
  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);
+                }
             }
         }
     }