void CreateMarker(MarkerNode node) { var copied = node.DeepCopy(); markers.Add(copied); chart.AddMarker(copied.Marker); SelectedMarker = copied; }
void CreateMarker(Vector2 position, Vector2 size, string category = "", string preset = "", MetaData metaData = null) { position = (position - dragTotal - PANEL_OFFSET * Vector2.right) / scale; position.y = Map.height - position.y; var marker = new RawMarker(position, size, category, preset, metaData); chart.AddMarker(marker); var markerNode = MarkerNode.Construct(marker); markers.Add(markerNode); SelectedMarker = markerNode; }