Plugins getting destroyed on game create and hot reload
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 25/100
- Issue 類型
- 缺陷
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- javascript, react, vite
研究方向
Reproduce the plugin behavior using the minimal example linked in the issue and the template's src/game/PhaserGame.jsx, especially lines 11–32. Compare browser refreshes with React-file and Phaser-related hot reloads, then verify that the plugin lifecycle behaves as expected in both the JavaScript and TypeScript templates.
由索引模型根據 Issue 內容生成。
描述
I have been trying to use a plugin with this template but it just gets destroyed, minimal example can be found at https://github.com/KlutzyBubbles/phaser-react-plugin
However is only gets destroyed when a browser refresh or hot reload of phaser related files happens, but works fine when react files are hot reloaded.
Below is an image where 1 is a browser refresh, 2 is a hot reload from a react file and 3 is a hot reload from a scene file.
The only spot i can see the game being destroyed which could trigger the plugin destroying is https://github.com/phaserjs/template-react/blob/db8c134eb6328ba5d08eb4ef77270f38e2e0b9b9/src/game/PhaserGame.jsx#L11C4-L32C15 but i don't know what to do to fix it. Any help or pointers would be greatly appreciated.
This can also be replicated in the typescript version of this template
- 主要語言
- JavaScript
- 星號
- 155
- 分支
- 52
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
相似的 Issue
-
enhancement ready
難度 2/5 1-3 小時 新手友好度 84/100
-
enhancement
難度 2/5 1-3 小時 新手友好度 75/100
DCGM/semant-demo#708 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
-
agents area: runtime automation chore cli consistency dependencies developer-experience difficulty: easy documentation enhancement good first issue help wanted hygiene json-output priority: P3 starters tests
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 1 天內回覆
-
Client codegen: an import repeated in an impl file is emitted twice, and the browser rejects the module可能已有人在做 @MalithaPrabhashana 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 64/100
jaseci-labs/jac#10756 ·
維護者通常 1 天內回覆