Unity下载安装Standard-Assets及报错解决

Unity降级之后不仅不自带规范包,从asset store里下载这个包之后还报一堆错。。无语凝噎。在此记录一下。

下载安装Standard Assets

  • 关上Assets Store搜Standard Assets进去的第一个就是,抉择add to my assets实现购买
  • 在Unity的导航栏关上Windows > Package Manager页面,左上角加号旁边有一个All Packages的标签(所以all packages并不显示全副的包!蛊惑。。),点一下切换到My Assets,就能看到规范包了。
  • 点击规范包,抉择好要导入的模块后点import,这些局部就会被导入到Assets\Standard Assets\目录了!

以下为导入后遇到的一些问题,按模块分类。。

Standard Assets\Utility

‘GUIText’ is obsolete
Assets\Standard Assets\Utility\SimpleActivatorMenu.cs(12,16): error CS0619: 'GUIText' is obsolete: 'GUIText has been removed. Use UI.Text instead.'

这个问题最坑的是提醒的批改倡议不残缺!!
貌似Unity从某个版本开始不必GUIText而改用UnityEngine.UI里的Text了,双击报错信息会间接关上这个SimpleActivatorMenu.cs文件。首先在文件头部加一条

using UnityEngine.UI;

而后把报错地位的

public GUIText camSwitchButton;

改成

public Text camSwitchButton;

保留,回去就好了。

参考:https://answers.unity.com/que…

Standard Assets\Editor

Editor\Water\Water4下一系列type or namespace name … could not be found的谬误

更坑,连个提醒也没有。。

这个Water貌似依赖Environment下的Water,从新关上导入规范包的页面,import一下Standard Assets\Environment\Water,解决。

参考:https://answers.unity.com/que…

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理