老师为什么我在将 luna添加prefabs后一运行luna就没了。系统提示错误MissingComponentException: There is no ‘Rigidbody2D’ attache...
老师为什么我在将 luna添加prefabs后一运行luna就没了。系统提示错误
MissingComponentException: There is no ‘Rigidbody2D’ attached to the “Luna” game object, but a script is trying to access it. You probably need to add a Rigidbody2D to the game object “Luna”. Or your script needs to check if the component is attached before using it. UnityEngine.Rigidbody2D.MovePosition (Vector2 position)
但明明加了组件代码也没问题