从Git加载Unity项目后com.unity.ugui出现大量CS0246错误
克隆Unity项目后com.unity.ugui出现大量CS0246错误
克隆Git仓库到另一台电脑后,打开Unity项目时com.unity.ugui脚本出现大量报错,安全模式下累计超过100条类似错误,均提示脚本中存在命名空间或类型缺失的问题。本地提交代码时无任何错误。
错误示例:
Library\PackageCache\com.unity.ugui@1.0.0\Runtime\EventSystem\EventData\BaseEventData.cs(44,30): error CS0246: The type or namespace name 'EventSystem' could not be found (are you missing a using directive or an assembly reference?)
Library\PackageCache\com.unity.ugui@1.0.0\Runtime\UI\Core\DefaultControls.cs(140,61): error CS0246: The type or namespace name 'Selectable' could not be found (are you missing a using directive or an assembly reference?)
Library\PackageCache\com.unity.ugui@1.0.0\Runtime\EventSystem\InputModules\PointerInputModule.cs(10,48): error CS0246: The type or namespace name 'BaseInputModule' could not be found (are you missing a using directive or an assembly reference?)
已尝试的解决方法:
- 调整Input System包,无效果;
- 尝试重新安装
com.unity.ugui,但因其为依赖包,无法确认是否安装成功。
内容的提问来源于stack exchange,提问作者user20848475
相关产品推荐
相关产品推荐

