Browse Source

Refactored reference doc exporter

master
chrisgregan 10 years ago
parent
commit
b2a500b764
  1. 6
      Assets/Fungus/Flowchart/Editor/BlockEditor.cs

6
Assets/Fungus/Flowchart/Editor/BlockEditor.cs

@ -607,8 +607,11 @@ namespace Fungus
foreach(FieldInfo field in type.GetFields() ) foreach(FieldInfo field in type.GetFields() )
{ {
TooltipAttribute attribute = (TooltipAttribute)Attribute.GetCustomAttribute(field, typeof(TooltipAttribute)); TooltipAttribute attribute = (TooltipAttribute)Attribute.GetCustomAttribute(field, typeof(TooltipAttribute));
if( attribute != null ) if (attribute == null )
{ {
continue;
}
// Change field name to how it's displayed in the inspector // Change field name to how it's displayed in the inspector
string propertyName = Regex.Replace(field.Name, "(\\B[A-Z])", " $1"); string propertyName = Regex.Replace(field.Name, "(\\B[A-Z])", " $1");
if (propertyName.Length > 1) if (propertyName.Length > 1)
@ -622,7 +625,6 @@ namespace Fungus
markdown += propertyName + " | " + field.FieldType + " | " + attribute.tooltip + "\n"; markdown += propertyName + " | " + field.FieldType + " | " + attribute.tooltip + "\n";
} }
}
if (markdown.Length > 0) if (markdown.Length > 0)
{ {

Loading…
Cancel
Save