using_the_web_editor.rst 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. .. _doc_using_the_web_editor:
  2. Using the Web editor
  3. ====================
  4. Since Godot 3.2.4, 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 project exporting. As a workaround, you can download the project source
  35. using **Project > Tools > Download Project Source** and export it using a
  36. `native version of the Godot editor <https://godotengine.org/download>`__.
  37. - The editor won't warn you when closing the tab with unsaved changes.
  38. - No lightmap baking support. You can still use existing lightmaps if they were
  39. baked with a native version of the Godot editor
  40. (e.g. by importing an existing project).
  41. The following features are unlikely to be supported due to inherent limitations
  42. of the Web platform:
  43. - No support for external script editors.
  44. - No support for Android one-click deploy.
  45. .. seealso::
  46. See the
  47. `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.
  48. Importing a project
  49. -------------------
  50. To import an existing project, the current process is as follows:
  51. - Specify a ZIP file to preload on the HTML5 filesystem using the
  52. **Preload project ZIP** input.
  53. - Run the editor by clicking **Start Godot editor**.
  54. The Godot project manager should appear after 10-20 seconds.
  55. On slower machines or connections, loading may take up to a minute.
  56. - In the dialog that appears at the middle of the window, specify a name for
  57. the folder to create then click the **Create Folder** button
  58. (it doesn't have to match the ZIP archive's name).
  59. - Click **Install & Edit** and the project will open in the editor.
  60. .. attention::
  61. It's important to place the project folder somewhere in ``/home/web_user/``.
  62. If your project folder is placed outside ``/home/web_user/``, you will
  63. lose your project when closing the editor!
  64. When you follow the steps described above, the project folder will always be
  65. located in ``/home/web_user/projects``, keeping it safe.
  66. Editing and running a project
  67. -----------------------------
  68. Unlike the native version of Godot, the web editor is constrained to a single
  69. window. Therefore, it cannot open a new window when running the project.
  70. Instead, when you run the project by clicking the Run button or pressing
  71. :kbd:`F5`, it will appear to "replace" the editor window.
  72. The web editor offers an alternative way to deal with the editor and game
  73. windows (which are now "tabs"). You can switch between the **Editor** and
  74. **Game** tabs using the buttons on the top. You can also close the running game
  75. or editor by clicking the **×** button next to those tabs.
  76. Where are my project files?
  77. ---------------------------
  78. Due to browser security limitations, the editor will save the project files to
  79. the browser's IndexedDB storage. This storage isn't accessible as a regular folder
  80. on your machine, but is abstracted away in a database.
  81. You can download the project files as a ZIP archive by using
  82. **Project > Tools > Download Project Source**. This can be used to export the
  83. project using a `native Godot editor <https://godotengine.org/download>`__,
  84. since exporting from the web editor isn't supported yet.
  85. In the future, it may be possible to use the
  86. `HTML5 FileSystem API <https://developer.mozilla.org/en-US/docs/Web/API/FileSystem>`__
  87. to store the project files on the user's filesystem as the native editor would do.
  88. However, this isn't implemented yet.