如何在 运行 时间创建 assetbundle?

How to create assetbundle at run time?

是否有将 3D 模型转换为资产包的工具? 要么 是否可以在 运行 时间转换它们?

我可以使用这个 Loading 3d object from external server in Unity3D 来转换它们。但是我的应用程序允许最终用户上传他们自己的 3D 模型并在 运行 时间通过下载在应用程序中查看它们。

p.s : 我对unity很陌生。

Is there a tool which converts 3D models to asset bundles ? or is it possible to convert them at run time ?

简短的回答是否定的。您不能在 运行 期间因为每个 Unity API 创建 Assetbundle 仅在编辑器插件上可用。

But My application allows end users to upload their own 3D models and view them in application by downloading at run time .

如果您想要做的是允许人们将 fbx 模型导入并查看到 Unity,那么您不需要 Assetbundle 来执行此操作。

您有两个建议:

1。如果您还想支持 40 多种其他 3D 文件格式,请使用 TriLib(非免费)插件。

2。如果您买不起付费工作插​​件,请自己制作。这需要您使用 C++ 中的 Autodesk FBX SDK 构建一个插件,并使用 C# 与之通信。由于您是初学者,我建议您选择#1。