29 lines
701 B
C#
29 lines
701 B
C#
#if MM_POSTPROCESSING
|
|
using UnityEngine;
|
|
using UnityEngine.Rendering.PostProcessing;
|
|
|
|
namespace MoreMountains.Feedbacks
|
|
{
|
|
[AddComponentMenu("More Mountains/Springs/MMSpringMotionBlurShutterAngle")]
|
|
public class MMSpringMotionBlurShutterAngle : MMSpringFloatComponent<PostProcessVolume>
|
|
{
|
|
protected MotionBlur _motionBlur;
|
|
|
|
protected override void Initialization()
|
|
{
|
|
if (Target == null)
|
|
{
|
|
Target = this.gameObject.GetComponent<PostProcessVolume>();
|
|
}
|
|
Target.profile.TryGetSettings(out _motionBlur);
|
|
base.Initialization();
|
|
}
|
|
|
|
public override float TargetFloat
|
|
{
|
|
get => _motionBlur.shutterAngle;
|
|
set => _motionBlur.shutterAngle.Override(value);
|
|
}
|
|
}
|
|
}
|
|
#endif |