Unity 支持不同类型的资源。
有关 Unity 内置导入器以及支持的文件类型和文件扩展名的完整列表,请参阅内置导入器。
下面列出了您在开始使用 Unity 时可能想要使用的一些更常见的资源类型,以及进一步了解如何使用的链接。
Type | 描述 |
---|---|
3D 模型文件 | 由于 Unity 支持 FBX 文件格式,因此可以从任何支持 FBX 的 3D 建模软件导入数据。Unity 也支持本机导入 SketchUp 文件。有关 Unity 支持的 3D 建模软件列表,请参阅模型文件格式。 3D 模型文件可以包含多种类型的资源,例如网格、动画、材质和纹理。 有关导入 3D 模型文件的更多信息,请参阅导入模型。 Unity 还支持 SketchUp 和 SpeedTree 格式。 |
图像文件 | 作为纹理导入的图像文件。Unity 支持最常见的图像文件类型,例如 BMP、TIF、TGA、JPG 和 PSD。如果将分层的 Photoshop (.psd) 文件保存到 Assets 文件夹中,Unity 会将它们导入为展平的图像。有关详细信息,请参阅导入纹理。 |
** 音频文件|Unity 支持很多音频文件格式。通常最好导入未压缩的音频文件格式,例如 wav** 或 aiff,因为在导入期间 Unity 将应用导入设置中指定的压缩设置。有关详细信息,请参阅导入音频文件。 | |
Text、HTML、XML、JSON | Unity 可以从文件中导入任意数据,允许您存储和使用来自外部源的数据。这些都由文本资产导入器 处理。 |
插件和与代码相关的资源 | 您可以将托管和原生插件作为资源(如 .dll 文件)放入您的 Unity 项目,以扩展您的游戏或应用的功能。Unity 还支持程序集定义以帮助您创建脚本并将其组织到程序集中。 |
本机资源 | Unity 编辑器本机支持一系列资源类型。您可以使用编辑器功能创建这些类型的资源。当您创建这些资源时,Unity 将代表它们的文件保存到您项目的 Assets 文件夹中的资源文件。 其中包括动画、曲线、渐变、遮罩、材质和预设。有关完整列表,请参阅下面内置导入器列表中的 NativeFormatImporter 类型。 |
通过 Unity Package Manager (UPM) 可将各种资源(包括插件、工具和库)直接安装到 Unity 中。这些是新的资源包类型,可通过 Package Manager 窗口获取。有关常规资源包的更多信息,请参阅资源包文档。
在构建游戏时,Unity 会存储有关资源的大量元数据,例如导入设置、其他资源的链接以及其他信息。如果要将资源转移到其他项目并保留所有此类信息,可将资源导出到以下容器之一:
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.