private void AppendDocComment(CSharpTextBuilder builder, UField field, bool isBlueprintType)
        {
            if (field == null || Settings.SkipDocumentation || string.IsNullOrEmpty(field.GetMetaData("Tooltip")))
            {
                return;
            }

            string tooltip = null;

            if (isBlueprintType)
            {
                // Blueprint metadata seems to have an internal representation which doesn't update the main metadata until reload.
                // TODO: Find the correct metadata for functions/variables for blueprint.
                // - Functions: Get function graph, call FBlueprintEditorUtils::GetGraphFunctionMetaData(graph), Metadata->ToolTip
                // - Variables: Call FBlueprintEditorUtils::GetBlueprintVariableMetaData?
                tooltip = field.GetToolTip();
            }
            else
            {
                tooltip = field.GetToolTip();
            }

            if (!string.IsNullOrEmpty(tooltip))
            {
                AppendDocComment(builder, tooltip, true);
            }
        }
Ejemplo n.º 2
0
 public static string GetMetaData <TEnum>(this UField field, TEnum key) where TEnum : struct
 {
     return(field.GetMetaData(UMeta.GetKey(key)));
 }