コード例 #1
0
        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();
        }
コード例 #2
0
        private IEnumerable <PropertyWrapper> GetProperties(Component component)
        {
            var filteredProperties = PropertyProvider.GetValidProperties();

            return(filteredProperties.Select(p => new PropertyWrapper(component, p)));
        }