您当前的位置: 首页 >  unity

十幺卜入

暂无认证

  • 7浏览

    0关注

    119博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

Unity3d2021版本 使用DOTween插件报错The type name ‘Rigidbody2D‘ could not be found in the namespace ‘****‘问题

十幺卜入 发布时间:2022-09-30 14:51:28 ,浏览量:7

问题

最近在升级项目至2021版本的过程中发现了诸多这种问题,今天就遇到这样的报错: 在这里插入图片描述

Assets\Plugins\Demigiant\DOTween\Modules\DOTweenModulePhysics2D.cs(143,18): error CS1069: The type name ‘Rigidbody2D’ could not be found in the namespace ‘UnityEngine’. This type has been forwarded to assembly ‘UnityEngine.Physics2DModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’ Enable the built in package ‘Physics 2D’ in the Package Manager window to fix this error.

Rigidbody2D(2D钢体)找不到的报错。

总结之前的问题,很快就能发现是Rigidbody2D(2D钢体)所在的包未引入的问题。

解决办法

Window > Package Manager 打开窗口: 在这里插入图片描述

选择“Packages:Built-in”,找到”Physics 2D”包并选中它,点击右下角的“Enable”按钮:

在这里插入图片描述

等待”Physics 2D”启用完成,报错将会消失 在这里插入图片描述

关注
打赏
1663314737
查看更多评论
立即登录/注册

微信扫码登录

0.1121s