Linux下安装Unity3d时可能会遇到的问题,以及解决方案
未经许可禁止转载,不制造互联网垃圾,从你我做起
本人Linux环境:Mint Linux 21
从Unity官方源下载unity
Debian or Ubuntu
Installing:
To install the Unity Hub on a Debian or Ubuntu Linux distribution, you need to add the Unity Hub Debian repository along with the public signing key to verify the integrity of the packages.
To add the Unity Hub repository, you need an entry in /etc/apt/sources.list
.
Run the following command to add the Unity Hub repository:
$ sudo sh -c 'echo "deb https://hub.unity3d.com/linux/repos/deb stable main" > /etc/apt/sources.list.d/unityhub.list'
To add the public signing key, run the following command:
$ wget -qO - https://hub.unity3d.com/linux/keys/public | sudo apt-key add -
Then update the package cache and install the package using:
$ sudo apt update
$ sudo apt-get install unityhub
Uninstalling the Hub:
To remove the Unity Hub from the system, run the following command:
$ sudo apt-get remove unityhub
UnityHub无法启动,如何安装UnityHub的openssl依赖
在启动UnityHub时,在有些Linux发行版上,UnityHub会卡在转圈的界面,这是因为缺少一个依赖,如果在终端中启动unityhub,会看到如下报错
ERROR: Licensing SDK logging callback is not registered.
Please use 'registerLoggingAdapter' function from the SDK to do so.
在论坛中有人贴出了解决办法,原帖链接第20楼
Got the same error after upgrading to Ubuntu 22
Installing openssl 1.1 did not work for me
Installing libssl1.1 did work -
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
libssl1.1
安装完毕后重启电脑,如果不出意外,unityhub就可以使用了
如果还是不能使用那我也没办法,愿伟大的开源之神保佑这个被Bug折磨的可怜孩子
VSCode中,没有Unity代码提示
Tips:默认读者已经做了以下几件事情
- 在UnityEditor中,在External Tools中选中了VSCode作为代码编辑器
- 安装了VSCode的C#拓展
- 安装了最新的dotnet-sdk(老版本没尝试过,本人使用的是dotnet-6.0-sdk)
- 安装了mono
在原帖中,给出的解决办法是在C#拓展中搜索设置Use Globle Mono
,并将参数修改为always
但如果你用的是最新版本的C#拓展,那么是没有这个选项的
我的解决办法是,将C#拓展降级到一年前的版本,这样就可以找到这个选项
降级方法:
在插件菜单点击C#拓展右下角小齿轮,选择安装另一个版本
,找到一个有着Use Globle Mono
设置的版本
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek “源神”启动!「GitHub 热点速览」
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· C# 集成 DeepSeek 模型实现 AI 私有化(本地部署与 API 调用教程)
· DeepSeek R1 简明指南:架构、训练、本地部署及硬件要求
· 2 本地部署DeepSeek模型构建本地知识库+联网搜索详细步骤