void update_shape(HUDShape newShape) { shape = newShape; if (bgMesh == null) { return; } bgMesh.SetSharedMesh( HUDUtil.MakeBackgroundMesh(shape)); if (EnableBorder) { HUDShape borderShape = shape; borderShape.Radius += BorderWidth; borderShape.Height += 2 * BorderWidth; borderShape.Width += 2 * BorderWidth; border.SetSharedMesh(HUDUtil.MakeBackgroundMesh(borderShape)); } }