/// <summary> /// Force this field to rebuild the list of its children. /// If you implement an editor specific to a type, you should only need to override this method. /// Consider clearing existing fields before adding new one. /// </summary> protected virtual void RefreshFields() { bool inspectDefaultItems = false; if (Instances.Length != 0) { object[] attributes = Instances[0].GetType().GetCustomAttributes(typeof(AdvancedInspectorAttribute), true); if (attributes.Length != 0) { inspectDefaultItems = ((AdvancedInspectorAttribute)attributes[0]).InspectDefaultItems; } else { inspectDefaultItems = InspectorPreferences.InspectDefaultItems; } } fields = InspectorField.GetEntries(null, instances, inspectDefaultItems); tab = GetTab(fields); }