Quantcast
Channel: Questions in topic: "post processing"
Viewing all articles
Browse latest Browse all 713

Saving Post Processing as a graphic option

$
0
0
Okay, so i made an settings scene which have 2 graphic options (performance and good). Performance option is just disabling the post procession, but i don't know how to set PlayerPrefs to save this options to next scenes (menu etc.) Here's code: using UnityEngine; using UnityEngine.Rendering.PostProcessing; using UnityEngine.UI; public class OptionsScene : MonoBehaviour { public PostProcessVolume ppv; Bloom bloom = null; ColorGrading cg = null; Vignette vg = null; void Start() { ppv.profile.TryGetSettings(out bloom); ppv.profile.TryGetSettings(out cg); ppv.profile.TryGetSettings(out vg); } public void OnGoodClick() { bloom.intensity.value = 15f; cg.postExposure.value = 1f; cg.saturation.value = 22f; vg.intensity.value = 1f; } public void OnPerformanceClick() { bloom.intensity.value = 0f; cg.postExposure.value = 0f; cg.saturation.value = 0f; vg.intensity.value = 0f; } }

Viewing all articles
Browse latest Browse all 713

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>