
学做愤怒的小鸟,最大距离没法实现,报以下错误: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.
报这个错时因为你的截图没有赋值,不能被赋值时因为你这个脚本没有挂载到游戏物体上。
解决方法:把这个脚本挂载到游戏物体上,操作步骤如下所示:


https://blog.csdn.net/lovetaozibaby/article/details/119941146 【望采纳】