UnityEvent as an VisualElement for GraphView
Hello! I need to create an UnityEvent VisualElement, from the UIElements namespace, to add to a node in a GraphView I'm making. I just can't seem to find anything that can do it. I can create TextFields and Labels like this:
TextField textField = new TextField("Description:");
Label label = new Label("Label");
But there's no way of creating an UnityEvent VisualElement. So my first thought was to create an Scriptable Object for every single UnityEvent, and use the Scriptable Object to call the functions, and it worked, but I ended up with 150 Scriptable Objects in total.
So does anyone have any easier way of creating the default UnityEvent UI as seen in the inspector with IMGUI, but as a VisualElement?
Your answer
![](https://koobas.hobune.stream/wayback/20220613034943im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How do I hide the UI in the Game view (in editor)? 1 Answer
how to connect WEBRTC in unity ? 2 Answers
Scaling font size in Unity 5.0 0 Answers
Control ScrollView with arrow keys? 3 Answers
Changing the UI Text 0 Answers