用户:
飞熊jSrt查看:18 回复:5 评论:18 创建时间:2020-10-02T09:17:09
是这样的,本来我复制代码“
// 先在场景中放置一个名称为 NPC 的实体。
const npc = world.querySelector('#星星');
npc.enableInteract = true; // 允许进行互动
npc.interactRadius = 16; // 实体的互动范围
npc.interactHint = npc.id; // 互动提示框显示实体的名称
npc.interactColor = new Box3RGBColor(1,0,1); // 互动提示的文字颜色
结果是:不能设置属性“enableinteraction”为空在eval......
(原文:TypeError: Cannot set property 'enableInteract' of null at eval (index.js:44:20)