Hi, I’m new to UE and I wanted to try to develop it while using automated tests, sort of a TDD. So Im trying to build a Visual Novel and after researching about the data storage, I decided to use DataAssets for a Chapter and DialogueNode. But as it can be overwhelming for non-programmers, I also decided to build alongside an editor tool to manage the data.
I have managed to set up an Edito Utility Widget, where we will be able to select a chapter, show it and edit.
Right now it searches all DataAssets of type Chapter to the combo box and shows the selected one to the other text, and when you click on Create New, it creates a new DA Chapter and saves it to the Content Browser and selects it.
I tried to do my first Editor Utility Test as follows:
What class is Event Prepare Test in?
In my case it works if it is in Data Asset (I don’t know why, but this works too) and it works if it is in Editor Utility Widget.
Basically, you need a main widget for your editor (Utility Widget) from which all other widgets (tabs) will be created.
You need to open it through the context menu of the Utility Widget asset (Run Editor Utility Widget item).
You also can create a tab using Blueprint using the Editor Utility Subsystem → Spawn And Register Tab function.
The tests are in Editor Utility Blueprint derived from class Editor Utility Test.
The Editor tool that I created (EUW_ChapterEditor) is an Editor Utility Widget that I am constructing at the Prepare Test. To normal use, I use the Run Editor Utility Widget.
As for Editor Utilty Tests on Widgets, I cant see the option to create those
I have widget objects created correctly (using construct object function), but AddToViewport does not work in the editor (and it should not).
As I said above - to create a new Utility Widget via Blueprint you need to use Editor Utility Subsystem → Spawn And Register Tab.