ExportationOptions.cs 4.0 KB

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