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(); }
public PropertyProvider(UnityEngine.Object obj, PropertyFilter propertyFilter) { _serializedObject = new SerializedObject(obj); _propertyFilter = propertyFilter; }