Closed IsaiahBlanks closed 4 years ago
It seems that the NPE is coming from the fact that the root
and rootWidget
fields come out null. These are set from the UIElement generated in NUIManagerInternal::createScreen
when opening the screen for the tutorial.
Copied @IsaiahBlanks's comment from Discord:
Turns out after a lot of looking through code and learning about reflection for a while (it seemed like even though I could see the module in game, it wasn't registering my class as a UIWidget), it turns out that https://github.com/Terasology/TutorialNui/issues/8 was simply fixed by reloading gradle and rebuilding the project :sweat_smile: . I suppose the issue should be closed now.
Hence, closing the issue.
See the page: TutorialNui Quick Start
When going through this quick introduction to NUI, it seems that the screen does not open at the first time the tutorial suggests you open it with
showScreen environmentInfoScreen
.How To Reproduce
Follow the tutorial to set up the TutorialNui module, create the .ui file, and create the java class for your screen. Then, at the Step 2 header, when you try to open the screen, it won't open because of a NullPointerException.
Logs