/// <summary> /// Constructs a new set of GUI elements for inspecting the depth of field settings object. /// </summary> /// <param name="settings">Initial values to assign to the GUI elements.</param> /// <param name="layout">Layout to append the GUI elements to.</param> public DepthOfFieldSettingsGUI(DepthOfFieldSettings settings, GUILayout layout) { this.settings = settings; enabledField.OnChanged += x => { this.settings.Enabled = x; MarkAsModified(); ConfirmModify(); }; focalDistanceField.OnChanged += x => { this.settings.FocalDistance = x; MarkAsModified(); ConfirmModify(); }; focalRangeField.OnChanged += x => { this.settings.FocalRange = x; MarkAsModified(); ConfirmModify(); }; nearTransitionRangeField.OnChanged += x => { this.settings.NearTransitionRange = x; MarkAsModified(); ConfirmModify(); }; farTransitionRangeField.OnChanged += x => { this.settings.FarTransitionRange = x; MarkAsModified(); ConfirmModify(); }; nearBlurAmount.OnChanged += x => { this.settings.NearBlurAmount = x; MarkAsModified(); ConfirmModify(); }; farBlurAmount.OnChanged += x => { this.settings.FarBlurAmount = x; MarkAsModified(); ConfirmModify(); }; layout.AddElement(enabledField); layout.AddElement(focalDistanceField); layout.AddElement(focalRangeField); layout.AddElement(nearTransitionRangeField); layout.AddElement(farTransitionRangeField); layout.AddElement(nearBlurAmount); layout.AddElement(farBlurAmount); }
private static extern void Internal_DepthOfFieldSettings(DepthOfFieldSettings managedInstance);
internal static extern void Internal_SetDepthOfField(IntPtr obj, ref DepthOfFieldSettings value);
private static extern void Internal_setdepthOfField(IntPtr thisPtr, DepthOfFieldSettings value);
internal static extern void Internal_GetDepthOfField(IntPtr obj, out DepthOfFieldSettings resultAsRef);