chengyoujie / GameInspect

查看H5游戏的节点信息 chrome扩展
18 stars 6 forks source link

TypeError: getComponent: Type must be non-nil at Node.addComponent (_virtual_cc-141f6284.js:34510:21) at new e (engine.js:1:16164) at e.init (engine.js:1:12271) at inspector.js:1:31848 at inspector.js:1:28475 #2

Open suboy1219 opened 4 months ago

suboy1219 commented 4 months ago

TypeError: getComponent: Type must be non-nil at Node.addComponent (_virtual_cc-141f6284.js:34510:21) at new e (engine.js:1:16164) at e.init (engine.js:1:12271) at inspector.js:1:31848 at inspector.js:1:28475

chengyoujie commented 4 months ago

游戏地址或者引擎名及版本号能提供下吗?

suboy1219 commented 4 months ago

3.8.2

suboy1219 commented 4 months ago

sorry , is 3.8.3

chengyoujie commented 4 months ago

ok,我一会看下,

chengyoujie commented 4 months ago

有demo或者线上地址吗?

suboy1219 commented 4 months ago

t._engine.version.startsWith("2.") || t._engine.version.startsWith("1.") ? t._drawAdapter = new a.CocosCreator2XDraw(t._engine) : t._drawAdapter = new o.CocosCreator3XDraw(t._engine),
不太明白这个, 我现在的版本是3.8.3, 是不是会走CocosCreator3XDraw , 但3.8.3有Graphics, 没有GraphicsComponent

chengyoujie commented 4 months ago

这个是如果是cocos是1.x或者2.x的 版本 使用CocosCreator2XDraw(针对1.x或2.x版本的接口) 绘制选中区域, 如果是cocos creator 3.x 包括你的3.8.3版本,使用CocosCreator3XDraw(针对3.x版本的接口)绘制选中区域, 可能是3.x版本的api有改动。

suboy1219 commented 4 months ago

OK , TypeError: getComponent: Type must be non-nil 就是因为没有GraphicsComponent类, 然后就报错了, 是否出个修复的版本?

chengyoujie commented 4 months ago

https://github.com/chengyoujie/GameInspect/releases/download/release/dist.rar 你在试下这个看还有报错吗?cocos的版本太多了,一些功能可能会有问题,有空我在测试下

suboy1219 commented 4 months ago

截图2024717113234 虽然还是有报错, 但可以使用,