矜严消 2022-09-13 15:11 采纳率: 0%
浏览 57

unity没办法用拖拽进行赋值,我要怎么做?

img


学做愤怒的小鸟,最大距离没法实现,报以下错误:UnassignedReferenceException: The variable RightPos of pig has not been assigned.
You probably need to assign the RightPos variable of the pig script in the inspector.

  • 写回答

2条回答 默认 最新

  • 陈言必行 领域专家: 游戏开发技术领域 2022-09-13 17:04
    关注

    报这个错时因为你的截图没有赋值,不能被赋值时因为你这个脚本没有挂载到游戏物体上。

    解决方法:把这个脚本挂载到游戏物体上,操作步骤如下所示:

    img

    img

    评论

报告相同问题?

问题事件

  • 创建了问题 9月13日