unity遇到问题总结

  • 背景
    刚刚开始学unity,很多都不会,顺便记录下来

一、当创建cs文件,打开却没有项目

  • 原因
    默认 Unity 不指定外部脚本编辑器时,会单纯打开 .cs 文件而已。而如果指定了 Visual Studio 作为外部脚本编辑器,那么再从 Unity 中打开 C# 项目时,将会生成 sln 和 csproj 文件,然后调用 Visual Studio 打开生成的 sln 和 csproj 文件。

  • 解决方法
    选择 Unity > Preferences__)中的 External Tools__ 面板选择所需的任何编辑器。
    在这里插入图片描述

  • 效果
    打开cs文件后
    在这里插入图片描述

二、移动旋转很夸张

  • 原因
    check if Apply Root Motion is ticked in the Animator, and make sure it’s NOT TICKED. Threw me for a good while!
  • 解决方法
    (取消Root Motion的勾选)
    在这里插入图片描述

三、Unity报错:Deterministic compilation failed. You can disable Deterministic builds in Player Settings

1、点击Edit–>Project Settings

在这里插入图片描述2.点击Player–>下拉找到Use Deterministic Compilation,然后取消勾选之后重启Unity
在这里插入图片描述

四、Deterministic compilation failed. You can disable Deterministic builds in Player Settings Library\PackageCache\com.unity.multiplayer-hlapi

  • 完整报错
    Deterministic compilation failed. You can disable Deterministic builds in Player Settings Library\PackageCache\[email protected]\Editor\Tools\Weaver\AssemblyInfo.cs(22,28): error CS8357: The specified version string contains wildcards, which are not compatible with determinism. Either remove wildcards from the version string, or disable determinism for this compilation

  • 解决方法
    ①点击包管理器
    在这里插入图片描述
    ②点击注册表
    在这里插入图片描述
    ③更新HLAPI
    在这里插入图片描述

五、Unity Hub许可证问题 达到最大申请次数之类的,Serial has reached the maximum number of activations

##Unity Hub许可证问题 达到最大申请次数之类的,Serial has reached the maximum number of activations

解决方案1:退出unity hub重新登录即可(这个方法在2022.11.22失灵了,咋搞都不行)
解决方案2:重启了一下电脑,直接选择自动激活(“获取免费的个人版许可证”),然后就成功了
解决方案3:删除tool下的library目录,删除C盘对应的unithub目录,重启unity申请个人版许可证

猜你喜欢

转载自blog.csdn.net/weixin_43679037/article/details/126801658