Unity 支持最常见的图像文件类型,例如 BMP、TIF、TGA、JPG 和 PSD。如果将分层的 Photoshop (.psd) 文件保存到 Assets
文件夹中,Unity 会将它们导入为展平的图像。如需了解详细信息,请参阅从 Photoshop 导入包含 Alpha 通道的图像或者将图像作为精灵导入
由于 Unity 支持 FBX 文件格式,因此可以从任何支持 FBX 的 3D 建模软件导入数据。Unity 也支持本机导入 SketchUp 文件。如需了解如何在从 3D 建模软件导出 FBX 文件时获得最佳结果,请参阅优化 FBX 文件。
注意:还可以使用原生格式(例如 .max、.blend、.mb 和 .ma)从最常见的 3D 建模软件中保存 3D 文件。Unity 在 Assets
文件夹中找到这些文件时,会通过回调 3D 建模软件的 FBX 导出插件来导入它们。但是,建议将它们导出为 FBX 格式。
无论使用哪种 3D 建模软件,Unity 都会从每个文件中导入网格和动画。有关 Unity 支持的 3D 建模软件列表,请参阅模型文件格式。
网格文件不需要导入动画。如果需要使用动画,则可以从单个文件导入所有动画,或导入单独的文件,每个文件包含一个动画。有关导入动画的更多信息,请参阅模型导入工作流程。
如果将未压缩的音频文件保存到 Assets
文件夹中,Unity 会根据指定的压缩设置来导入音频文件。有关详细信息,请参阅导入音频文件。
虽然在 Unity 中可以选择各种方式来压缩、修改或以其他方式处理资源,但在任何情况下,Unity 都不会修改原始的源文件。导入过程会读取源文件,并在内部创建一个可直接用于游戏的资源表示,与所选的导入设置相匹配。如果修改资源的导入设置,或者对 Assets
文件夹中的源文件进行更改,则会导致 Unity 再次重新导入资源以反映这些更改。
注意:导入原生 3D 格式要求 3D 建模软件与 Unity 安装在同一台计算机上。这是因为 Unity 要使用 3D 建模软件的 FBX Exporter 插件来读取文件。或者,也可以直接从应用程序导出为 FBX 格式并保存到项目文件夹中。
Unity 附带多个__标准资源 (Standard Assets)__。这些资源是大多数 Unity 客户使用的资源集合。这些资源包括:
为了将__标准资源 (Standard Assets)__ 传入和传出项目,Unity 使用__资源包__(可从 Unity Asset Store 获取)。资源包便于共享和重用 Unity 项目和资源集合。
注意:可从 Asset Store 下载 Standard Assets。
通过 Unity Package Manager (UPM) 可将各种资源(包括插件、工具和库)直接安装到 Unity 中。这些是新的资源包类型,可通过 Package Manager 窗口获取。有关常规资源包的更多信息,请参阅资源包文档。
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.