ExportationOptions.cs 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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 int ShadowMapSize { get; set; }
  25. public float ShadowMapBias { get; set; }
  26. public float ShadowBlurScale { get; set; }
  27. public float ProductionVersion { get; set; }
  28. public float DefaultAspectRatio { get; set; }
  29. public int DefaultUpdateOptions { get; set; }
  30. public int DefaultPreviewWindow { get; set; }
  31. public int DefaultLightFilter { get; set; }
  32. public int DefaultImageFormat { get; set; }
  33. public int DefaultPhysicsEngine { get; set; }
  34. public int DefaultLightmapMode { get; set; }
  35. public int DefaultLightmapBaking { get; set; }
  36. public int DefaultCoordinatesIndex { get; set; }
  37. public int DefaultColliderDetail { get; set; }
  38. public string DefaultIndexPage { get; set; }
  39. public string DefaultBuildPath { get; set; }
  40. public string DefaultScenePath { get; set; }
  41. public string DefaultScriptPath { get; set; }
  42. public int DefaultServerPort { get; set; }
  43. public string DefaultShaderFolder { get; set; }
  44. public string DefaultProjectFolder { get; set; }
  45. public string DefaultTypeSriptPath { get; set; }
  46. public string DefaultNodeRuntimePath { get; set; }
  47. public ExportationOptions()
  48. {
  49. ProductionVersion = (float)ExporterWindow.BabylonVersion;
  50. HostPreviewPage = true;
  51. BuildJavaScript = true;
  52. CompileTypeScript = true;
  53. AttachUnityEditor = true;
  54. ShowDebugControls = true;
  55. LightRotationOffset = new Vector3(0,0,0);
  56. LightIntensityFactor = 1f;
  57. ReflectionDefaultLevel = 0.25f;
  58. DefaultQualityLevel = 90;
  59. EmbeddedShaders = true;
  60. ExportLightmaps = true;
  61. ExportCollisions = true;
  62. ExportPhysics = true;
  63. ExportShadows = false;
  64. WorkerCollisions = false;
  65. ShadowMapSize = 1024;
  66. ShadowMapBias = 0.0001f;
  67. ShadowBlurScale = 0;
  68. DefaultAspectRatio = 1f;
  69. DefaultUpdateOptions = 0;
  70. DefaultPreviewWindow = 0;
  71. DefaultLightFilter = 4;
  72. DefaultImageFormat = 1;
  73. DefaultLightmapMode = 0;
  74. DefaultLightmapBaking = 0;
  75. DefaultCoordinatesIndex = 1;
  76. DefaultColliderDetail = 4;
  77. DefaultPhysicsEngine = 0;
  78. DefaultShaderFolder = String.Empty;
  79. DefaultServerPort = 8888;
  80. DefaultBuildPath = "Build";
  81. DefaultScenePath = "Scenes";
  82. DefaultScriptPath = "Scripts";
  83. DefaultIndexPage = "Index.html";
  84. DefaultTypeSriptPath = Tools.GetDefaultTypeScriptPath();
  85. DefaultNodeRuntimePath = Tools.GetDefaultNodeRuntimePath();
  86. DefaultProjectFolder = Tools.FormatSafePath(Application.dataPath.Replace("/Assets", "/Project"));
  87. }
  88. }
  89. }