private Task OnUpdateVisualization(MessageContainer obj)
        {
            MessageUpdateVisualization message = MessageUpdateVisualization.Unpack(obj);

            if (message != null)
            {
                UpdateVisualization(message.Settings, false);
            }

            return(Task.CompletedTask);
        }
 /// <summary>
 /// Updates an existing visualization with the provided <see cref="VisProperties"/>.
 /// </summary>
 /// <param name="config">The struct containing the settings for the updated visualization.</param>
 /// <param name="syncWithRemote">Indicates whether this update should also happen on remote clients.</param>
 public void UpdateVisualization(VisProperties config, bool syncWithRemote = true)
 {
     if (Visualizations.TryGetValue(config.VisId, out AbstractView visualization))
     {
         visualization.UpdateView(config);
         if (syncWithRemote)
         {
             var message = new MessageUpdateVisualization(config);
             Services.NetworkManager().SendMessage(message.Pack());
         }
     }
 }