/// <summary> /// Constructs a new set of GUI elements for inspecting the ambient occlusion 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 AmbientOcclusionSettingsGUI(AmbientOcclusionSettings settings, GUILayout layout) { this.settings = settings; enabledField.OnChanged += x => { this.settings.Enabled = x; MarkAsModified(); ConfirmModify(); }; radiusField.OnChanged += x => { this.settings.Radius = x; MarkAsModified(); ConfirmModify(); }; biasField.OnChanged += x => { this.settings.Bias = x; MarkAsModified(); ConfirmModify(); }; fadeDistanceField.OnChanged += x => { this.settings.FadeDistance = x; MarkAsModified(); ConfirmModify(); }; fadeRangeField.OnChanged += x => { this.settings.FadeRange = x; MarkAsModified(); ConfirmModify(); }; intensityField.OnChanged += x => { this.settings.Intensity = x; MarkAsModified(); ConfirmModify(); }; powerField.OnChanged += x => { this.settings.Power = x; MarkAsModified(); ConfirmModify(); }; qualityField.OnChanged += x => { this.settings.Quality = (uint)x; MarkAsModified(); ConfirmModify(); }; qualityField.Step = 1.0f; layout.AddElement(enabledField); layout.AddElement(radiusField); layout.AddElement(biasField); layout.AddElement(fadeDistanceField); layout.AddElement(fadeRangeField); layout.AddElement(intensityField); layout.AddElement(powerField); layout.AddElement(qualityField); }
private static extern void Internal_AmbientOcclusionSettings(AmbientOcclusionSettings managedInstance);
internal static extern void Internal_SetAmbientOcclusion(IntPtr obj, ref AmbientOcclusionSettings value);
private static extern void Internal_setambientOcclusion(IntPtr thisPtr, AmbientOcclusionSettings value);
internal static extern void Internal_GetAmbientOcclusion(IntPtr obj, out AmbientOcclusionSettings resultAsRef);