A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
docs: refresh the Editor guide and quick-start onboarding
esengine6df7b371d11a
diff --git a/docs/astro/src/content/docs/getting-started/quick-start.mdx b/docs/astro/src/content/docs/getting-started/quick-start.mdxindex 98809a00e..3b0a595c7 100644--- a/docs/astro/src/content/docs/getting-started/quick-start.mdx+++ b/docs/astro/src/content/docs/getting-started/quick-start.mdx@@ -39,8 +39,10 @@ with a system written in TypeScript.));```-4. **Preview.** Add the `Speed` component to your entity, then press **F5** to- run the scene. The sprite moves.+4. **Preview.** Save the script — the editor watches your project's scripts and, a+ moment later, extracts your component definitions, so `Speed` appears in the+ inspector's **Add Component** list automatically. Add `Speed` to your entity,+ then press **F5** to run the scene. The sprite moves.</Steps>diff --git a/docs/astro/src/content/docs/guides/editor.mdx b/docs/astro/src/content/docs/guides/editor.mdxindex 9f2f426c3..bd1d485fd 100644--- a/docs/astro/src/content/docs/guides/editor.mdx+++ b/docs/astro/src/content/docs/guides/editor.mdx@@ -177,10 +177,17 @@ assets in place:**Import** by dragging files in from Finder / Explorer, or via Import…. Each asset getsa `.meta` sidecar the first time it's seen. Per-asset context actions include Rename,-Duplicate, Copy Path, Copy Reference, Show in Explorer, and Delete. Rename, move,-and duplicate each post a toast with an **Undo** action; Delete asks for-confirmation and moves the files to the OS trash. The folder tree is fully-keyboard-driven — arrows walk and collapse/expand, Enter opens a folder.+Duplicate, Copy Path, Copy Reference, **Find Usages**, Show in Explorer, and Delete.+Rename, move, and duplicate each post a toast with an **Undo** action — and renaming or+moving an asset rewrites its references in every open document, so nothing dangles.+**Delete** first lists every scene, prefab, and asset that references the file (so you+know exactly what breaks), then moves it to the OS trash — still recoverable with Undo.+The folder tree is fully keyboard-driven — arrows walk and collapse/expand, Enter opens+a folder.++**Find Usages** — right-click an asset, or click the reference count in the Inspector's+asset details — lists everywhere a texture, material, prefab, or scene is referenced,+across the on-disk dependency graph *and* the unsaved open scene.## Play-in-editor@@ -195,6 +202,16 @@ The **Play** controls in the toolbar run your game:Because play uses an isolated realm — the same runtime that ships your game — what yousee in play is what a player gets.+## Autosave & recovery++The editor periodically snapshots your **unsaved** documents — only when there are+unsaved changes and no Play session is running — so a crash or power loss never costs+more than the last few moments of work. A snapshot is kept in your project's workspace+folder and never counts as a real save. The next time you open the project, if a+snapshot is newer than the file on disk, the editor offers to **restore** it; saving the+document supersedes its snapshot. This sits alongside the crash minidump and the+automatic reload if the GPU render process is lost.+## Specialized editorsDouble-click an asset in the Content Browser to open its editor in a document tab.@@ -270,9 +287,13 @@ Settings → Keyboard Shortcuts.| Nudge selection (×10 with Shift) | Arrow keys || Frame Selected | `F` || Play / toggle · Stop | `F5` · `Esc` |+| Command Palette | `mod + shift + P` || Content Drawer | `Ctrl + Space` || Project Settings | `mod + ,` |+The **Command Palette** (`mod + shift + P`) fuzzy-searches every runnable command —+the fastest way to reach any action without hunting through menus.+Beyond the command shortcuts, the editor is keyboard-navigable throughout: menusand context menus move with the arrow keys (plus type-ahead, Home/End, and `→` /`←` for submenus), the Outliner jumps to entities as you type, the Content@@ -285,3 +306,10 @@ focus is always shown with a visible focus ring.capture the viewport) over an MCP server — a developer/automation surface driven fromscripts, separate from the visual editor above.</Aside>++## See also++- [Scenes](/docs/guides/scene/) — what a `.esscene` holds and how it loads.+- [Scripting](/docs/guides/scripting/) — project components appear in the inspector automatically.+- [Prefabs](/docs/guides/prefab/) — reusable entity templates with per-instance overrides.+- [Building & Exporting](/docs/guides/build-export/) — ship the project to web, WeChat, or a playable ad.diff --git a/docs/astro/src/content/docs/zh-cn/getting-started/quick-start.mdx b/docs/astro/src/content/docs/zh-cn/getting-started/quick-start.mdxindex 96bc1d800..c6b1d3ed0 100644--- a/docs/astro/src/content/docs/zh-cn/getting-started/quick-start.mdx+++ b/docs/astro/src/content/docs/zh-cn/getting-started/quick-start.mdx@@ -38,7 +38,9 @@ import { Steps, Aside } from '@astrojs/starlight/components';));```-4. **预览。** 给实体加上 `Speed` 组件,然后按 **F5** 运行场景,精灵就会移动。+4. **预览。** 保存脚本——编辑器会监视项目脚本,片刻后提取你的组件定义,于是 `Speed`+ 会自动出现在检视器的**添加组件**列表里。给实体加上 `Speed` 组件,然后按 **F5** 运行+ 场景,精灵就会移动。</Steps>diff --git a/docs/astro/src/content/docs/zh-cn/guides/editor.mdx b/docs/astro/src/content/docs/zh-cn/guides/editor.mdxindex 56c3d3e90..5da35b06b 100644--- a/docs/astro/src/content/docs/zh-cn/guides/editor.mdx+++ b/docs/astro/src/content/docs/zh-cn/guides/editor.mdx@@ -148,9 +148,14 @@ Details 是选中项的检视器。它列出实体上的每个组件及其字段**创建材质实例**(从材质)。**导入**可从访达/资源管理器把文件拖进来,或用"导入…"。每个资产首次出现时会得到一个 `.meta`-边车。按资产的上下文动作包括重命名、复制、复制路径、复制引用、在文件管理器中显示、删除。-重命名、移动和复制各会弹出一个带**撤销**按钮的 toast;删除会先确认,然后把文件移进系统-回收站。文件夹树完全可用键盘操作——方向键行走与折叠/展开,Enter 进入文件夹。+边车。按资产的上下文动作包括重命名、复制、复制路径、复制引用、**查找引用**、在文件管理器中+显示、删除。重命名、移动和复制各会弹出一个带**撤销**按钮的 toast——而且重命名或移动资产会+改写每个已打开文档里对它的引用,所以不会留下悬空引用。**删除**会先列出引用该文件的每个场景、+预制件和资产(让你清楚会破坏什么),再把文件移进系统回收站——仍可用撤销复原。文件夹树完全+可用键盘操作——方向键行走与折叠/展开,Enter 进入文件夹。++**查找引用**——右键一个资产,或点击检视器资产详情里的引用计数——会列出一张纹理、材质、+预制件或场景被引用的所有位置,横跨磁盘上的依赖图**以及**尚未保存的打开场景。## 编辑器内运行@@ -162,6 +167,13 @@ Details 是选中项的检视器。它列出实体上的每个组件及其字段因为运行用的是隔离 realm——正是发布你游戏的那套运行时——你在运行里看到的,就是玩家会得到的。+## 自动保存与恢复++编辑器会定期快照你**未保存**的文档——仅在存在未保存改动且没有 Play 会话运行时——所以崩溃或+断电最多只损失最近片刻的工作。快照保存在项目的工作区文件夹里,永远不算作真正的保存。下次+打开项目时,如果某个快照比磁盘上的文件更新,编辑器会提议**恢复**它;保存文档就会让它的快照+失效。这与崩溃 minidump、以及 GPU 渲染进程丢失时的自动重载并存。+## 专用编辑器在内容浏览器里双击一个资产,即可在文档标签里打开它的编辑器。@@ -224,9 +236,12 @@ Details 是选中项的检视器。它列出实体上的每个组件及其字段| 微移选择(按 Shift ×10) | 方向键 || 聚焦选中 | `F` || 运行/切换 · 停止 | `F5` · `Esc` |+| 命令面板 | `mod + shift + P` || 内容抽屉 | `Ctrl + Space` || 项目设置 | `mod + ,` |+**命令面板**(`mod + shift + P`)对每一条可运行命令做模糊搜索——不用翻菜单,直达任何操作的最快方式。+在命令快捷键之外,编辑器整体都可用键盘导航:菜单与右键菜单用方向键移动(还有输入即跳、Home/End、`→` / `←` 进出子菜单),Outliner 输入名字即跳转,内容浏览器的文件夹树和瓦片调色板都用方向键行走,键盘焦点始终有可见的焦点环。@@ -236,3 +251,10 @@ Home/End、`→` / `←` 进出子菜单),Outliner 输入名字即跳转,内容场景树/检视器、抓取视口),通过一个 MCP server 提供——这是一个由脚本驱动的开发/自动化面,与上面的可视化编辑器分开。</Aside>++## 参见++- [场景](/docs/zh-cn/guides/scene/) —— 一个 `.esscene` 里有什么、如何加载。+- [脚本](/docs/zh-cn/guides/scripting/) —— 项目组件会自动出现在检视器里。+- [预制体](/docs/zh-cn/guides/prefab/) —— 带逐实例覆盖的可复用实体模板。+- [构建与导出](/docs/zh-cn/guides/build-export/) —— 把项目发布到 Web、微信或可玩广告。