Files
TaiWan/Assets/Roaming/Scripts/Controller/PostProcessController.cs

23 lines
696 B
C#
Raw Normal View History

2025-10-31 15:20:38 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering;
public class PostProcessController : MonoBehaviour
{
// Start is called before the first frame update
public static void SetToFlur()
{
Volume volume = CommonData.MainCamera.GetComponent<Volume>();
VolumeComponent dof = volume.profile.components[0];
dof.parameters[7].SetValue(new FloatParameter(300));
}
public static void ResetToClear()
{
Volume volume = CommonData.MainCamera.GetComponent<Volume>();
VolumeComponent dof = volume.profile.components[0];
dof.parameters[7].SetValue(new FloatParameter(50));
}
}