public void Clone(ref SubmeshLibrary clone) { clone.Clear(); clone.SURFACES.AddRange(SURFACES); clone.MATERIALS.AddRange(MATERIALS); clone.SUBMESH = new Dictionary <int, Object>(SUBMESH); clone.SUBMESH_MATERIAL = new Dictionary <int, Material>(SUBMESH_MATERIAL); clone.TILED_SUBMESH = new Dictionary <int, bool>(TILED_SUBMESH); clone.SUBMESH_COUNT = SUBMESH_COUNT; clone.WALLSECTION_SUBMESH_MAPPING = new Dictionary <WallSection, int[]>(WALLSECTION_SUBMESH_MAPPING); clone.WALLSECTION_SUBMESH_TILING = new Dictionary <WallSection, bool[]>(WALLSECTION_SUBMESH_TILING); }
private void OnEnable() { _portal = (Portal)target; _plane = Primitives.Plane(10); // _mat = AssetDatabase.LoadAssetAtPath<Material>("Assets/BuildR2/Materials/Blueprint.mat"); if (_submeshLibrary == null) { _submeshLibrary = new SubmeshLibrary(); } _submeshLibrary.Clear(); _submeshLibrary.Add(_portal); _portal.UpdatePreviewMesh(_submeshLibrary); }