소스 검색

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);
+                }
             }
         }
     }