/// <inheritdoc/> protected override void Setup() { filterDrawer = new FilterField(OpenFilteringMethodMenu); graphics = inspector.Preferences.graphics; inspector.OnFilterChanging += SyncFilterFromInspectorState; if (ClearButtonWidth <= 0f) { #if SAFE_MODE if (Event.current == null) { #if DEV_MODE Debug.LogWarning(GetType().Name + ".Setup called with Event.current null. This is dangerous because can't reference many GUI related methods."); #endif DrawGUI.OnNextBeginOnGUI(() => ClearButtonWidth = InspectorPreferences.Styles.ToolbarCancel.CalcSize(GUIContent.none).x, false); } else #endif { ClearButtonWidth = InspectorPreferences.Styles.ToolbarCancel.CalcSize(GUIContent.none).x; } } #if DEV_MODE && PI_ASSERTATIONS Debug.Assert(ClearButtonWidth > 0f, ClearButtonWidth); #endif }
/// <inheritdoc/> protected override void Setup() { var preferences = inspector.Preferences; graphics = preferences.graphics; }