Change displayed connection value of custom type during runtime

Hi,

Does anyone know a way to change the way a custom type is displayed over the graph connections during play mode? I wanted to know if there was an attribute or something I could add to the custom type variable to have it display a value instead of the generic icon during playmode.

It might not be something like this, maybe it’s a method/property but you get the point:

public class MyCustomType
{
    [VisualScripting.DisplayThisAttribute] // display this attribute on connection line
    public float value;
    ...
    ...
}

Here’s a picture of what the system looks like now. I’d like the last connection line to show the value of MyCustomType (which in this case would be 0).

It’s interesting to note that the Transform object gets its own connection line description (albeit not useful). Is there a way to customize it for my own types?

Thanks!

You’re outputting the class which has no value. Output a float and it will show a value ie. MyCustomType.value.

As for naming the type, there might be a unit attribute but not sure on a reflected type which is just code? Also its better to wrap inside a unit, as reflected types are about 10x slower, if its going to have alot of usage that is.

To clarify, what I’m asking is if there’s a way to implement the type so that if I’m passing the MyClassType object around, I can set up the text on the connection as some overridden property. As an example, when the Transform object is passed it has that “Bolt Flow Graph” text written the green connector. I wonder if there is a way to get a similar text (or property) to show up on the MyCustomType object.

I don’t quite understand what you mean by wrapping the type inside a unit. Do you mean creating a custom C# node? The only resource I can dig up on implementing custom types within Bolt is in the documentation and I got the type to show up via the steps there.

[Description(“Demonstrates DisplayNameAttribute.”)]
[DisplayName(“RenamedProperty”)]
public bool MisnamedProperty

This is part of C#, you can see if this works?