rj-action-library/Runtime/Cameras/SetCameraFarDOF.cs

31 lines
495 B
C#
Raw Normal View History

2025-11-28 14:24:23 +00:00
using System;
using Godot;
namespace Rokojori
{
[Tool]
[GlobalClass]
public partial class SetCameraFarDOF:Action
{
[Export]
public WorldEnvironment worldEnvironment;
[Export]
public bool dofBlurFarEnabled = true;
protected override void _OnTrigger()
{
var atts = worldEnvironment.CameraAttributes as CameraAttributesPractical;
if ( atts == null )
{
return;
}
atts.DofBlurFarEnabled = dofBlurFarEnabled;
}
}
}