Allow loading obj meshes

This commit is contained in:
Bálint Hodossy
2025-01-20 11:09:18 +00:00
parent 61973a33c9
commit 36cbef50b7
3 changed files with 112 additions and 10 deletions
@@ -36,7 +36,7 @@ public class MjMeshShape : IMjShape {
var assetName = MjEngineTool.Sanitize(
mjcf.GetStringAttribute("mesh", defaultValue: string.Empty));
if (!string.IsNullOrEmpty(assetName)) {
Mesh = (Mesh)Resources.Load(assetName);
Mesh = Resources.Load<Mesh>(assetName);
}
}