Skip to content

Commit

Permalink
Merge pull request #229 from Kapim/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
Kapim authored Dec 8, 2021
2 parents 7d2e87e + 1498d5d commit 131042f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arcor2_AREditor/Assets/BASE/Scripts/MeshImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ private void ImportMesh(string path, string aoId) {
// Supports: FBX, OBJ, GLTF2, STL, PLY, 3MF
AssetLoaderOptions assetLoaderOptions = AssetLoader.CreateDefaultLoaderOptions();
AssetLoader.LoadModelFromFile(path, null, delegate (AssetLoaderContext assetLoaderContext) {
if (Path.GetExtension(path).ToLower() == ".stl") {
assetLoaderContext.RootGameObject.transform.Rotate(0f, 180f, 0f);
}

OnMeshImported?.Invoke(this, new ImportedMeshEventArgs(assetLoaderContext.WrapperGameObject, aoId));
}, null, assetLoaderOptions: assetLoaderOptions, onError: OnModelLoadError, wrapperGameObject: loadedObject);
}
Expand Down

0 comments on commit 131042f

Please sign in to comment.