ExportationOptions.cs 3.8 KB

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