public InspectorContext( PropertyElement root, PropertyPath propertyPath, IProperty property, IEnumerable <Attribute> attributes = null ) { Root = root; PropertyPath = propertyPath; BasePath = new PropertyPath(); BasePath.PushPath(PropertyPath); if (BasePath.PartsCount > 0) { BasePath.Pop(); } Name = property.Name; Part = PropertyPath.PartsCount > 0 ? PropertyPath[PropertyPath.PartsCount - 1] : default; var attributeList = new List <Attribute>(attributes ?? property.GetAttributes()); Attributes = attributeList; Tooltip = property.GetAttribute <TooltipAttribute>()?.tooltip; DisplayName = GuiFactory.GetDisplayName(property); IsDelayed = property.HasAttribute <DelayedAttribute>(); }
void PushPathPart(PropertyPath.Part path) { m_Path.PushPart(path); }