public string mask; //Mask Texture public void Save(UnityEngine.Rendering.PostProcessing.Vignette layer, string maskPath = "") { if (layer != null) { enabled = new BoolValue(layer.enabled); mode = new VignetteModeValue(layer.mode); color = new ColorValue(layer.color); center = new Vector2Value(layer.center); intensity = new FloatValue(layer.intensity); smoothness = new FloatValue(layer.smoothness); roundness = new FloatValue(layer.roundness); rounded = new BoolValue(layer.rounded); opacity = new FloatValue(layer.opacity); //Save path from the post process object? //mask = maskPath; } }
public void Load(UnityEngine.Rendering.PostProcessing.Vignette layer) { if (layer != null) { enabled.Fill(layer.enabled); layer.active = layer.enabled.value; mode.Fill(layer.mode); color.Fill(layer.color); center.Fill(layer.center); intensity.Fill(layer.intensity); smoothness.Fill(layer.smoothness); roundness.Fill(layer.roundness); rounded.Fill(layer.rounded); opacity.Fill(layer.opacity); // Load Texture from the Path. // layer.mask.value = mask; } }