// Start is called before the first frame update void Start() { UnityEngine.Rendering.VolumeProfile volumeProfile = GetComponent <UnityEngine.Rendering.Volume>()?.profile; if (!volumeProfile) { throw new System.NullReferenceException(nameof(UnityEngine.Rendering.VolumeProfile)); } if (!volumeProfile.TryGet(out motionBlur)) { throw new System.NullReferenceException(nameof(motionBlur)); } if (!volumeProfile.TryGet(out vignette)) { throw new System.NullReferenceException(nameof(vignette)); } if (!volumeProfile.TryGet(out filmGrain)) { throw new System.NullReferenceException(nameof(filmGrain)); } if (!volumeProfile.TryGet(out colorAdjustments)) { throw new System.NullReferenceException(nameof(colorAdjustments)); } }
public void SetTimeMode(TimeModeEnum aTimeMode) { PlayState newPlayState = PlayState.SetTimeMode(this.currentState, aTimeMode); UpdatePlayState(newPlayState); UnityEngine.Rendering.VolumeProfile volumeProfile = this.v.profile; if (!volumeProfile) { throw new System.NullReferenceException(nameof(UnityEngine.Rendering.VolumeProfile)); } if (!volumeProfile.TryGet(out this.colorAdjustments)) { throw new System.NullReferenceException(nameof(this.colorAdjustments)); } switch (aTimeMode) { case TimeModeEnum.NORMAL: this.colorAdjustments.saturation.Override(0f); break; case TimeModeEnum.PAUSED: this.colorAdjustments.saturation.Override(-100f); break; case TimeModeEnum.DOUBLE: break; default: throw new ArgumentOutOfRangeException(nameof(aTimeMode), aTimeMode, null); } }
// Start is called before the first frame update void Start() { hex = GameObject.Find("Hex").GetComponent <SetAllHexagonsToDefault>(); gamEnd = GameObject.Find("Enemies").GetComponent <GameEnd>(); respawn = GameObject.Find("Player Respawn"); blackOut.SetActive(false); rend = GetComponent <Renderer>(); player = GetComponent <Player>().data; respawnScript = GetComponent <Respwan>(); playerLight = GetComponent <PlayerLightManager>(); rb = GetComponent <Rigidbody>(); cam = Camera.main; UnityEngine.Rendering.VolumeProfile volumeProfile = cam.GetComponent <UnityEngine.Rendering.Volume>()?.profile; if (!volumeProfile) { throw new System.NullReferenceException(nameof(UnityEngine.Rendering.VolumeProfile)); } if (!volumeProfile.TryGet(out vignette)) { throw new System.NullReferenceException(nameof(vignette)); } vignette.intensity.Override(0f); if (!volumeProfile.TryGet(out colorAdj)) { throw new System.NullReferenceException(nameof(colorAdj)); } colorAdj.saturation.Override(0f); fadeOut.SetActive(false); }
// Start is called before the first frame update void Start() { UnityEngine.Rendering.VolumeProfile volumeProfile = GetComponent <UnityEngine.Rendering.Volume>()?.profile; if (!volumeProfile) { throw new System.NullReferenceException(nameof(UnityEngine.Rendering.VolumeProfile)); } if (!volumeProfile.TryGet(out colorAdjustments)) { throw new System.NullReferenceException(nameof(colorAdjustments)); } if (!volumeProfile.TryGet(out filmGrain)) { throw new System.NullReferenceException(nameof(filmGrain)); } if (!volumeProfile.TryGet(out chromaticAberration)) { throw new System.NullReferenceException(nameof(chromaticAberration)); } if (!volumeProfile.TryGet(out vignette)) { throw new System.NullReferenceException(nameof(vignette)); } if (!volumeProfile.TryGet(out whiteBalance)) { throw new System.NullReferenceException(nameof(whiteBalance)); } //InvokeRepeating("UpdatePostProcessing", 0.1f, 1f); }
void Start() { volume = gameObject.GetComponent <Volume>(); UnityEngine.Rendering.VolumeProfile volumeProfile = GetComponent <UnityEngine.Rendering.Volume>()?.profile; volumeProfile.TryGet(out colorAdjustments); }
void Start() { volume = gameObject.GetComponent <Volume>(); UnityEngine.Rendering.VolumeProfile volumeProfile = GetComponent <UnityEngine.Rendering.Volume>()?.profile; volumeProfile.TryGet(out depthOfField); }
// Start is called before the first frame update void Awake() { UnityEngine.Rendering.VolumeProfile volumeProfile = GetComponent <UnityEngine.Rendering.Volume>()?.profile; if (!volumeProfile.TryGet(out vignette)) { throw new System.NullReferenceException(nameof(vignette)); } vignetteStartColour = vignette.color.value; vignetteStartIntensity = vignette.intensity.value; }
// Start is called before the first frame update void Start() { UnityEngine.Rendering.VolumeProfile volumeProfile = GetComponent <UnityEngine.Rendering.Volume>()?.profile; if (!volumeProfile) { throw new System.NullReferenceException(nameof(UnityEngine.Rendering.VolumeProfile)); } if (!volumeProfile.TryGet(out chromaticAberration)) { throw new System.NullReferenceException(nameof(chromaticAberration)); } }
void Awake() { MainScreenCache = MainScreen; PlayerCache = Player; MainScreenCache.gameObject.SetActive(true); GuideCache = Guide; Global_Volume_Cache = Global_Volume; MenuCache = ESC_Menu; profile = Global_Volume_Cache.GetComponent <UnityEngine.Rendering.Volume>().profile; profile.TryGet(out CA); profile.TryGet(out FG); profile.TryGet(out CAJ); profile.TryGet(out DF); profile.TryGet(out LD); }
//Create a global post processing volume and assign the correct layer and default profile public static void SetupGlobalVolume() { GameObject volumeObject = new GameObject("Global Post-process Volume"); #if PPS UnityEngine.Rendering.PostProcessing.PostProcessVolume volume = volumeObject.AddComponent<UnityEngine.Rendering.PostProcessing.PostProcessVolume>(); volumeObject.layer = SCPE.GetLayerID(); volume.isGlobal = true; #endif #if URP Volume volume = volumeObject.AddComponent<Volume>(); volume.isGlobal = true; #endif string type = "PostProcessProfile"; #if URP type = "VolumeProfile"; #endif //Find default profile string[] assets = AssetDatabase.FindAssets("SC Default Profile t: " + type); if (assets.Length > 0) { string assetPath = AssetDatabase.GUIDToAssetPath(assets[0]); #if PPS UnityEngine.Rendering.PostProcessing.PostProcessProfile defaultProfile = (UnityEngine.Rendering.PostProcessing.PostProcessProfile)AssetDatabase.LoadAssetAtPath(assetPath, typeof(UnityEngine.Rendering.PostProcessing.PostProcessProfile)); volume.sharedProfile = defaultProfile; #endif #if URP UnityEngine.Rendering.VolumeProfile defaultProfile = (UnityEngine.Rendering.VolumeProfile)AssetDatabase.LoadAssetAtPath(assetPath, typeof(UnityEngine.Rendering.VolumeProfile)); volume.sharedProfile = defaultProfile; #endif } else { Debug.Log("The default \"SC Post Effects\" profile could not be found. Add a new profile to the volume to get started."); } Selection.objects = new[] { volumeObject }; EditorUtility.SetDirty(volumeObject); }
void Start() { volumeProfile = postProcessing.GetComponent <UnityEngine.Rendering.Volume>().profile; volumeProfile.TryGet(out vg); volumeProfile.TryGet(out chromatic); }