What is the proper way for creating custom widget component attached to UMG Editor ?
I Figured out how to do it. On UMG Module there is UWidget iterator, that just iterate through all possible UMG components and attaches them to Palette.
Basically, You have to create custom widget class ( even in your custom Project, Plugin isn’t needed ), and eventually give him custom category by overriding function GetPaletteCategory().
I want to create custom Graph with node connection, so unfortunately I am not able to make it by using default UMG Components from Palette.
if only UMG had a spline widget, it could solve a ton of problems. im pretty sure the spline rendering code is somewhere outside of slate, but it would be nice if it could be made into a UMG widget primitive.
Even with Splines there isn’t easy way to make connection between nodes. You can’t just make something like this in Your custom UMG Component:
UPROPERTY(EditDefaultsOnly ... ) TArray<UWidget*> Nodes;
Because Node-Widgets created in my Panel aren’t spawned like Actors on map, so they won’t be seen in Default panel under “Nodes” section.
I could create something like:
UPROPERTY(EditDefaultsOnly ... ) TArray<FString> NodeNames;
But it is error-prone definition
At this moment I’ve got code similar to 2-nd example and it works. But anyway it needs some upgrades to make it more user friendly
For future: all UWidgets definitions are in UMG module placed in:
maybe you can’t connect custom umg components, but you could make connections between widgets made from those custom components. you just have to bind the pin button’s “drag and drop” function to copy and paste the widget references. the only part that you can’t make with UMG at the moment is the rendering splines part.
I will check this out. I don’t need to make graphical connection between nodes, but anyway, the easiest way I think could be override Tick and on each frame render line between connected points.
I just wrote an article on creating custom UserWidget, considering exposing variables, exposing events and updating UserWidget state in the Designer.