ExportationOptions.cs 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. using System;
  2. using System.IO;
  3. using UnityEngine;
  4. using BabylonHosting;
  5. namespace Unity3D2Babylon
  6. {
  7. public class ExportationOptions
  8. {
  9. public bool HostPreviewPage { get; set; }
  10. public bool BuildJavaScript { get; set; }
  11. public bool CompileTypeScript { get; set; }
  12. public bool AttachUnityEditor { get; set; }
  13. public bool ShowDebugControls { get; set; }
  14. public float ReflectionDefaultLevel { get; set; }
  15. public SerializableVector3 LightRotationOffset { get; set; }
  16. public float LightIntensityFactor { get; set; }
  17. public int DefaultQualityLevel { get; set; }
  18. public bool EmbeddedShaders { get; set; }
  19. public bool ExportLightmaps { get; set; }
  20. public bool ExportCollisions { get; set; }
  21. public bool ExportPhysics { get; set; }
  22. public bool ExportShadows { get; set; }
  23. public bool WorkerCollisions { get; set; }
  24. public SerializableVector3 Gravity { get; set; }
  25. public SerializableVector3 CameraEllipsoid { get; set; }
  26. public int ShadowMapSize { get; set; }
  27. public float ShadowMapBias { get; set; }
  28. public float ShadowBlurScale { get; set; }
  29. public float ProductionVersion { get; set; }
  30. public float DefaultAspectRatio { get; set; }
  31. public int DefaultUpdateOptions { get; set; }
  32. public int DefaultPreviewWindow { get; set; }
  33. public int DefaultLightFilter { get; set; }
  34. public int DefaultImageFormat { get; set; }
  35. public int DefaultPhysicsEngine { get; set; }
  36. public int DefaultLightmapMode { get; set; }
  37. public int DefaultLightmapBaking { get; set; }
  38. public int DefaultCoordinatesIndex { get; set; }
  39. public int DefaultColliderDetail { get; set; }
  40. public string DefaultIndexPage { get; set; }
  41. public string DefaultBuildPath { get; set; }
  42. public string DefaultScenePath { get; set; }
  43. public string DefaultScriptPath { get; set; }
  44. public int DefaultServerPort { get; set; }
  45. public string DefaultShaderFolder { get; set; }
  46. public string DefaultProjectFolder { get; set; }
  47. public string DefaultTypeSriptPath { get; set; }
  48. public string DefaultNodeRuntimePath { get; set; }
  49. public ExportationOptions()
  50. {
  51. ProductionVersion = (float)ExporterWindow.BabylonVersion;
  52. HostPreviewPage = true;
  53. BuildJavaScript = true;
  54. CompileTypeScript = true;
  55. AttachUnityEditor = true;
  56. ShowDebugControls = true;
  57. LightRotationOffset = new Vector3(0,0,0);
  58. LightIntensityFactor = 1f;
  59. ReflectionDefaultLevel = 0.25f;
  60. DefaultQualityLevel = 90;
  61. EmbeddedShaders = true;
  62. ExportLightmaps = true;
  63. ExportCollisions = true;
  64. ExportPhysics = true;
  65. ExportShadows = false;
  66. WorkerCollisions = false;
  67. Gravity = new Vector3(0, -0.9f, 0);
  68. CameraEllipsoid = new Vector3(0.5f, 0.85f, 0.5f);
  69. ShadowMapSize = 1024;
  70. ShadowMapBias = 0.0001f;
  71. ShadowBlurScale = 0;
  72. DefaultAspectRatio = 1f;
  73. DefaultUpdateOptions = 0;
  74. DefaultPreviewWindow = 0;
  75. DefaultLightFilter = 4;
  76. DefaultImageFormat = 1;
  77. DefaultLightmapMode = 0;
  78. DefaultLightmapBaking = 0;
  79. DefaultCoordinatesIndex = 1;
  80. DefaultColliderDetail = 4;
  81. DefaultPhysicsEngine = 0;
  82. DefaultShaderFolder = String.Empty;
  83. DefaultServerPort = 8888;
  84. DefaultBuildPath = "Build";
  85. DefaultScenePath = "Scenes";
  86. DefaultScriptPath = "Scripts";
  87. DefaultIndexPage = "Index.html";
  88. DefaultTypeSriptPath = Tools.GetDefaultTypeScriptPath();
  89. DefaultNodeRuntimePath = Tools.GetDefaultNodeRuntimePath();
  90. DefaultProjectFolder = Tools.FormatSafePath(Application.dataPath.Replace("/Assets", "/Project"));
  91. }
  92. }
  93. }