# 跨平台自定义模型导入器TriLib 2 – Model Loading Package

- 原文：https://www.interestcreator.com/trilib-2-model-loading-package/
- 站点：https://www.interestcreator.com/
- 发布：2022-09-24
- 更新：2026-11-08
- 分类：Unity插件、Unity资产
- 标签：3D、HDR、HDRP、PBR、Unity、URP、WebGL、动画、模型、游戏

## 概要

跨平台运行时 3D 模型导入库，全 C# 编写，支持 FBX、OBJ、GLTF2、STL 等格式；站内版本表只列 Unity 2019.3.0f6，且 URP 与 HDRP 标为不兼容。

## 正文

![1664031184 75f4f14639fce69](https://www.interestcreator.com/wp-content/uploads/2022/09/1664031184-75f4f14639fce69.jpg)

TriLib 2 是一个跨平台运行时 3D 模型导入器，完全用 C# 编写

| **Unity版本** | **内置渲染管道** | **通用渲染管道（URP）** | **高清渲染管道（HDRP）** |
| --- | --- | --- | --- |
| 2019.3.0f6 | 支持 | 不兼容 | 不兼容 |

### 其他兼容性信息

创建标准渲染管道项目时，从包中导入“TriLibCore”文件夹。

创建 HDRP 项目时，从包中导入“TriLibHDRP”和“TriLibCore”文件夹。

创建 UniversalRP 项目时，从包中导入“TriLibUniversalRP”和“TriLibCore”文件夹。

使用自定义渲染管道时，您应该扩展“MaterialMapper”类。

![1664031191 358cc8aed95049a](https://www.interestcreator.com/wp-content/uploads/2022/09/1664031191-358cc8aed95049a.jpg)

描述

**FBX**、**OBJ**、**GLTF2**、**STL**、**PLY**、**3MF**和**ZIP**文件支持

跨平台：**Windows**、**Mac**、**Linux**、**UWP**、**Android**、**WebGL**、**iOS**

从文件系统、Web 或任何自定义源导入模型

TriLib 可以帮助您为游戏添加修改功能、创建关卡/场景编辑器、创建 AR/VR 可视化等等！

[模型查看器（webgl）](https://ricardoreis.net/trilib/trilib2demo/modelviewer/)

[头像加载器（](https://ricardoreis.net/trilib/trilib2demo/avatarloader/)[webgl](https://ricardoreis.net/trilib/trilib2demo/modelviewer/)）

![1664031188 e7a9c07e09bc60a](https://www.interestcreator.com/wp-content/uploads/2022/09/1664031188-e7a9c07e09bc60a.jpg)

没有本机插件依赖项（用 C# 编写）

注释源代码*

网格导入

点云导入

动画导入

材料导入

纹理导入

灯光导入

相机导入

头像创作

高度可定制

各种样品

包括一个完整的 PBR 模型查看器

包括一个跨平台文件浏览器

定期更新

![1664031190 85aba2a0f3da26f](https://www.interestcreator.com/wp-content/uploads/2022/09/1664031190-85aba2a0f3da26f.jpg)

*一些 TriLib 内容（文件格式加载器和核心功能）被预编译成 DLL（库）以减小包大小

其他兼容性信息
 When creating a Standard Render Pipeline project, import the “TriLibCore” folder from the package.

When creating an HDRP project, import the “TriLibHDRP” and “TriLibCore” folders from the package.

When creating an UniversalRP project, import the “TriLibUniversalRP” and “TriLibCore” folders from the package.

When using a custom Render Pipeline, you should extend the “MaterialMapper” class.
 描述
 FBX, OBJ, GLTF2, STL, PLY, 3MF, and ZIP files support

Cross-platform: Windows, Mac, Linux, UWP, Android, WebGL, and iOS

Import models from file-system, web, or any custom source

TriLib can help you add modding functionality to your games, create level/scene editors, create AR/VR visualizations, and more!

Model Viewer (Web Demo)

Avatar Loader (Web Demo)
 技术细节
 No native-plugin dependencies (Written in C#)

Commented source-code*

Mesh importing

Point Cloud importing

Animation importing

Material importing

Texture importing

Lights importing

Cameras importing

Avatar creation

Highly customizable

Various samples

A complete PBR model viewer included

A cross-platform file browser included

Periodically updated

*Some TriLib content (File-format loaders and core functionality) is pre-compiled into DLLs (libraries) to decrease the package size

API Reference

![1664031187 da1d2ee45c62619](https://www.interestcreator.com/wp-content/uploads/2022/09/1664031187-da1d2ee45c62619.jpg)
![1664031186 55752d9c3478015](https://www.interestcreator.com/wp-content/uploads/2022/09/1664031186-55752d9c3478015.jpg)

相关资源：[《虚幻有的我都要》第二期FPS 4K Custom Modern Handguns For Unity](https://www.interestcreator.com/fps-4k-custom-modern-handguns-for-unity/) · [《虚幻有的我都要》第三期-蒸汽朋克狂野的西部](https://www.interestcreator.com/sky-city-wild-west-steampunk-for-unity/) · [赛博朋克风格城市建筑模型kitbash3d-cyberpunk](https://www.interestcreator.com/cyberpunk/)

## 常见问题

### 支持哪些模型格式？

FBX、OBJ、GLTF2、STL、PLY、3MF 和 ZIP。

### 支持哪些 Unity 版本？

站内版本表只列了 2019.3.0f6 一条记录。

### 兼容 URP 和 HDRP 吗？

两处说法不一致：版本表把 URP 和 HDRP 都标为「不兼容」，而兼容性说明又分别给出了导入 TriLibHDRP、TriLibUniversalRP 文件夹的做法。

### 需要本机插件吗？

不需要。原文强调没有本机插件依赖，完全用 C# 编写。

### 支持哪些平台？

Windows、Mac、Linux、UWP、Android、WebGL 和 iOS。

### 能导入动画和材质吗？

能。支持网格、点云、动画、材质、纹理、灯光、相机的导入，也能创建头像。

### 是完全开源的代码吗？

源代码带注释，但部分内容（文件格式加载器和核心功能）预编译成 DLL 以减小包体积。
