public ComponentWrapper(Component component) { Component = component; PropertyFilter = new PropertyFilter(); // "m_Script" is a serialized property of each custom Component, but there's no need for it to show up // in the SmartCopier interface or to copy it to a new Component. PropertyFilter.AddFilteredPropertyName("m_Script"); PropertyFilter.AddFilteredAttribute <NoCopyAttribute>(); PropertyProvider = new PropertyProvider(component, PropertyFilter); Checked = true; FoldOut = false; RefreshProperties(); }
private IEnumerable <PropertyWrapper> GetProperties(Component component) { var filteredProperties = PropertyProvider.GetValidProperties(); return(filteredProperties.Select(p => new PropertyWrapper(component, p))); }