# 嵌入式 Linux 故障排除

> Solve the common issues that might occur when using the Embedded Linux Unity Editor.

本页面列出了使用嵌入式 Linux Unity Editor 时可能发生的常见问题。

## Player 构建失败并出现错误##the-player-build-fails-with-an-error

导出 Unity 项目时，将显示以下错误：`No EmbeddedLinux Burst Support on X86/Arm32 architecture`。禁用 Settings 中的 Burst 并将其从项目中移除并不能解决问题，因为另一个包依赖于它。

### 解决方案##solution

32 位嵌入式 Linux 平台不支持 Burst。为避免遇到该错误，可使用 `--burst-disable-compilation` 参数启动 Unity Editor 来禁用 Burst。

## Wayand is not available 错误##wayand-is-not-available-error

在目标设备上启动播放器失败，原因如下：SDL `Error: wayland,x11 not available`，但 Wayland 可用。

### 解决方案##solution

发生此错误的原因可能是以下原因之一：

* SDL2 未定位 Wayland 库。确保可通过播放器应用程序中的 `dlopen` 找到 Wayland 库。
* Unity 至少需要 Wayland 版本 1.18。由于某些系统只有 1.16 或更低版本可用，因此请确保目标设备至少支持 Wayland 版本 1.18。
* 与 Wayland 显示的连接失败。确保正确设置了 Wayland 环境。

## 当目标平台为 UWP 时，光照贴图会在 Editor 中损坏 GI 缓存##rendering-issues-with-msaa-on-i.mx8-embedded-linux-devices

在 Editor 中使用光照贴图时，如果选择 UWP 作为目标平台，GI 缓存会受损。

### 解决方案##solution

Unity Editor 的 Player 版本中的 `-nographics commandline` 参数是导致此问题的根本原因，因为它会生成需要加载 gfx 设备的天空环境探针和反射探针，否则这些探针会包含未初始化的数据。要防止发生这种情况，请在不使用 `-nographics` 的情况下运行播放器构建，或在 Editor 中为构建中包含的每个场景生成光照。也就是说，不要添加光源或生成光照贴图，而是生成能自动烘焙天空探针的光照。设置 `-nographics` 后，不会渲染任何探针。

## 其他资源##additional-resources

* [Linux Editor 故障排除问题](https://docs.unity3d.com/2022.3/Documentation/Manual/linux-editor-troubleshooting.html)
