public override void UpdateLayer(TerrainLayerChange changes, Action callback = null)
        {
            int index = changes.Index;

            if (index > 0 && index < _layers.Count)
            {
                bool         changed = false;
                TerrainLayer layer   = _layers[index];
                if (changes.Opacity != null && layer.Opacity != changes.Opacity)
                {
                    layer.Opacity = (float)changes.Opacity;
                    changed       = true;
                }
                if (changes.Visible != null && layer.Visible != changes.Visible)
                {
                    layer.Visible = (bool)changes.Visible;
                    changed       = true;
                }
                if (changed)
                {
                    Material.SetFloat($"_Diffuse{index}Opacity", layer.Visible ? layer.Opacity : 0);
                    _layers[index] = layer;
                }
            }
            callback?.Invoke();
        }
 public override void UpdateLayer(TerrainLayerChange changes, Action callback = null)
 {
     if (_terrainModelManager.UpdateGlobalLayer(changes))
     {
         int          index = changes.Index;
         TerrainLayer layer = Layers[index];
         Material.SetFloat($"_Diffuse{index}Opacity", layer.Visible ? layer.Opacity : 0);
     }
     callback?.Invoke();
 }