using_the_web_editor.rst 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. .. _doc_using_the_web_editor:
  2. Using the Web editor
  3. ====================
  4. Since Godot 3.3, there is a `Web editor <https://editor.godotengine.org/>`__
  5. you can use to work on new or existing projects.
  6. .. note::
  7. The web editor is in a preliminary stage. While its feature set may be
  8. sufficient for educational purposes, it is currently **not recommended for
  9. production work**. See :ref:`doc_using_the_web_editor_limitations` below.
  10. Browser support
  11. ---------------
  12. The Web editor requires support for WebAssembly's SharedArrayBuffer. This
  13. is in turn required to support threading in the browser. The following desktop
  14. browsers support WebAssembly threading and can therefore run the web editor:
  15. - Chrome 68 or later
  16. - Firefox 79 or later
  17. - Edge 79 or later
  18. Opera and Safari are not supported yet. Safari may work in the future once
  19. proper threading support is added.
  20. **Mobile browsers are currently not supported.**
  21. The web editor supports both the GLES3 and GLES2 renderers, although GLES2 is
  22. recommended for better performance and compatibility with old/low-end hardware.
  23. .. note::
  24. If you use Linux, due to
  25. `poor Firefox WebGL performance <https://bugzilla.mozilla.org/show_bug.cgi?id=1010527>`__,
  26. it's recommended to use a Chromium-based browser instead of Firefox.
  27. .. _doc_using_the_web_editor_limitations:
  28. Limitations
  29. -----------
  30. Due to limitations on the Godot or Web platform side, the following features
  31. are currently missing:
  32. - No C#/Mono support.
  33. - No GDNative support.
  34. - No debugging support. This means GDScript debugging/profiling, live scene
  35. editing, the Remote Scene tree dock and other features that rely on the debugger
  36. protocol will not work.
  37. - No project exporting. As a workaround, you can download the project source
  38. using **Project > Tools > Download Project Source** and export it using a
  39. `native version of the Godot editor <https://godotengine.org/download>`__.
  40. - The editor won't warn you when closing the tab with unsaved changes.
  41. - No lightmap baking support. You can still use existing lightmaps if they were
  42. baked with a native version of the Godot editor
  43. (e.g. by importing an existing project).
  44. The following features are unlikely to be supported due to inherent limitations
  45. of the Web platform:
  46. - No support for external script editors.
  47. - No support for Android one-click deploy.
  48. .. seealso::
  49. See the
  50. `list of open issues on GitHub related to the web editor <https://github.com/godotengine/godot/issues?q=is%3Aopen+is%3Aissue+label%3Aplatform%3Ahtml5+label%3Atopic%3Aeditor>`__ for a list of known bugs.
  51. Importing a project
  52. -------------------
  53. To import an existing project, the current process is as follows:
  54. - Specify a ZIP file to preload on the HTML5 filesystem using the
  55. **Preload project ZIP** input.
  56. - Run the editor by clicking **Start Godot editor**.
  57. The Godot project manager should appear after 10-20 seconds.
  58. On slower machines or connections, loading may take up to a minute.
  59. - In the dialog that appears at the middle of the window, specify a name for
  60. the folder to create then click the **Create Folder** button
  61. (it doesn't have to match the ZIP archive's name).
  62. - Click **Install & Edit** and the project will open in the editor.
  63. .. attention::
  64. It's important to place the project folder somewhere in ``/home/web_user/``.
  65. If your project folder is placed outside ``/home/web_user/``, you will
  66. lose your project when closing the editor!
  67. When you follow the steps described above, the project folder will always be
  68. located in ``/home/web_user/projects``, keeping it safe.
  69. Editing and running a project
  70. -----------------------------
  71. Unlike the native version of Godot, the web editor is constrained to a single
  72. window. Therefore, it cannot open a new window when running the project.
  73. Instead, when you run the project by clicking the Run button or pressing
  74. :kbd:`F5`, it will appear to "replace" the editor window.
  75. The web editor offers an alternative way to deal with the editor and game
  76. windows (which are now "tabs"). You can switch between the **Editor** and
  77. **Game** tabs using the buttons on the top. You can also close the running game
  78. or editor by clicking the **×** button next to those tabs.
  79. Where are my project files?
  80. ---------------------------
  81. Due to browser security limitations, the editor will save the project files to
  82. the browser's IndexedDB storage. This storage isn't accessible as a regular folder
  83. on your machine, but is abstracted away in a database.
  84. You can download the project files as a ZIP archive by using
  85. **Project > Tools > Download Project Source**. This can be used to export the
  86. project using a `native Godot editor <https://godotengine.org/download>`__,
  87. since exporting from the web editor isn't supported yet.
  88. In the future, it may be possible to use the
  89. `HTML5 FileSystem API <https://developer.mozilla.org/en-US/docs/Web/API/FileSystem>`__
  90. to store the project files on the user's filesystem as the native editor would do.
  91. However, this isn't implemented yet.