首页 > 解决方案 > 如何在 Unity 中集成 xBim?

问题描述

我已经使用 NuGet 安装了 xBim 以实现统一,它运行良好,直到我尝试使用 GeometryEngine 创建 3D 形状:

using (IfcStore model = IfcStore.Open(filename, null))
{
   var context = new Xbim3DModelContext(model);
   context.CreateContext();
}

context.CreateContext(); 导致错误。起初我得到:

FileNotFoundException:无法加载文件或程序集“Xbim.Geometry.Engine.dll”或其依赖项之一

这有点奇怪,因为我确实在 NuGet 中安装了几何引擎,但后来我尝试在这里为 github 项目编译 DLL:

https://github.com/xBimTeam/XbimGeometry

并将它们复制到插件文件夹中。现在我没有收到任何错误消息,但 Unity 会在执行 context.CreateContext(); 时崩溃到桌面;

我一直在网上搜索,但找不到任何解决方法。任何建议表示赞赏。

标签: unity3dxbim

解决方案


我没有答案(目前也在尝试在 Unity 中使用 xBim),但我通过此处列出的主题发现了什么:

https://github.com/xBimTeam/XbimGeometry/issues?utf8=%E2%9C%93&q=unity+

是没有直接的解决方案。在几个地方提到的解决方法是在一个小的外部 .NET 支持程序中进行从 .ifc 到 .weBIM 的转换。看到这个:

https://github.com/xBimTeam/XbimGeometry/issues/109

希望这会有所帮助。如果您有其他解决方案,我想听听。


推荐阅读