Ptr<Mesh> Mesh::CreateMeshFromFile(const String& filePath) { auto exceptionManager = ExceptionManager::GetInstance(); AssimpLoader loader; Ptr<Mesh> mesh = loader.Load(filePath); if (mesh == nullptr) { Ptr<Exception> exception = Ptr<Exception>::New((String)"加载模型文件" + filePath + "失败。原因是:\n" + exceptionManager->GetException()->GetInfo()); exceptionManager->PushException(exception); return nullptr; } return mesh; }