From 12d3e0ae099f8360dab1062bc1c41fc0269aa297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A1lint=20Hodossy?= Date: Wed, 23 Nov 2022 15:02:35 +0000 Subject: [PATCH] Create separate mesh when MjMeshfilter is first instantiated, to support duplicating in Editor --- unity/Runtime/Components/Shapes/MjMeshFilter.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/unity/Runtime/Components/Shapes/MjMeshFilter.cs b/unity/Runtime/Components/Shapes/MjMeshFilter.cs index f97902fa..c91f7a87 100644 --- a/unity/Runtime/Components/Shapes/MjMeshFilter.cs +++ b/unity/Runtime/Components/Shapes/MjMeshFilter.cs @@ -32,6 +32,7 @@ public class MjMeshFilter : MonoBehaviour { _geom = GetComponent(); _shapeChangeStamp = new Vector4(0, 0, 0, -1); _meshFilter = GetComponent(); + _meshFilter.mesh = new Mesh(); } protected void Update() {