Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice

Feature Request Please add a Summary/Documentation Attribute for documentation similar to the PortLabel attribute

Discussion in 'Visual Scripting' started by termway, Oct 6, 2023.

  1. termway

    termway

    Joined:
    Jul 5, 2012
    Posts:
    80
    The current method (https://docs.unity3d.com/Packages/c....9/manual/vs-create-custom-node-add-docs.html) is too tedious.

    Here a code example (duplicate of the PortLabelAttribute)

    Code (CSharp):
    1. using System;
    2.  
    3. namespace Unity.VisualScripting
    4. {
    5.     [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
    6.     public class SummaryAttribute : Attribute
    7.     {
    8.         public SummaryAttribute(string label)
    9.         {
    10.             this.label = label;
    11.         }
    12.  
    13.         public string label { get; private set; }
    14.     }
    15. }
    In the UnitDescriptor file
    upload_2023-10-6_15-56-11.png

    Here an example with the While Unit:
    upload_2023-10-6_15-57-14.png

    Proof:
    upload_2023-10-6_16-5-41.png