首页 > 手游开发 > Unity3D > Unity3D中JS脚本报错: ‘active’ is not a member of
2019
04-07

Unity3D中JS脚本报错: ‘active’ is not a member of

在Unity 2018中打开一个老的项目,其中JS脚本编写的对象中报错:Assets/Resources/NewScripts/WeaponManager.js(163,37): BCE0019: ‘active’ is not a member of ‘SniperScarenewScript’.

Unity3D中JS脚本报错: 'active' is not a member of - 第1张  | 逗分享开发经验

原来在最新的版本中使用gameobject. activeSelf替代了active来检验对象是否为激活状态,而active属性已经不存在了

最后编辑:
作者:游戏创作者大陆

留下一个回复

你的email不会被公开。