帮助
开发常见问题
使用 Input Class 函数时发生错误。
2min
在 ZEPETOScript 中使用 Unity 提供的 Legacy Input Class 时,Unity 编辑器中会出现以下消息:错误:c# 异常:您正在尝试使用 UnityEngine.Input 类读取输入,但您已在 Player Settings 中将活动输入处理切换到 Input System 包。 可能会发生错误。
如果发生此错误,请尝试以下方法。
![Document image Document image](https://images.archbee.com/fCt3n1oCa8rgNJ8fw9I2N-v_TB8QEgoWqFS8QGprzbP-20240904-102412.png?format=webp)
1) 通过文件 > 构建设置 > Player Settings 打开 Unity 项目设置窗口。
![Document image Document image](https://images.archbee.com/fCt3n1oCa8rgNJ8fw9I2N-Ts-LdYsCCSIwrFZMoSeZq-20240904-102412.png?format=webp)
2) 请检查项目设置 > Player > Active Input Handling* 选项。 如果该选项不是 两者, 请将其更改为 两者。
![Document image Document image](https://images.archbee.com/fCt3n1oCa8rgNJ8fw9I2N-8He5EEr4kcZWVDKA1Ogs0-20240904-102412.png?format=webp)
3) 更改选项时,会出现弹出窗口,指示需要重新启动 Unity 编辑器。单击“应用”以重新启动 Unity 编辑器。
![Document image Document image](https://images.archbee.com/fCt3n1oCa8rgNJ8fw9I2N-Dii8z4f539lugsSrfc43n-20240904-102412.png?format=webp)
更新日期 11 Oct 2024
![Doc contributor](https://s3.amazonaws.com/archbee-animals/koala.png)
此页面是否对您有帮助?