Hello ,
I will start with the issue of the infinite loop. This is not a bug. The Widget is trying to get a self reference during the construct event but in order to fully construct it will need to get a self reference and it can’t get a self reference until it has been constructed. This is also a circular dependency problem. To show you what I mean, place a delay node between the event construct and the “Set input Mode Game and UI” node and it should start up just fine. This is not meant to be a solution. It is a hacky way to show you what I mean. The delay will allow the Widget to finish construction before looking for a self reference.
As for the mouse not being locked to the viewport, I was unable to reproduce this issue. I could not get my mouse to leave the window after the “Set input Mode Game and UI” was called. I have a couple of questions that will help narrow down the issue that you are experiencing.
Quick questions:
- Can you reproduce this in a clean project?
- If you can reproduce this in a clean project, can you provide a detailed set of steps to reproduce this issue?
- Did you use commands such as Shift+F1 to get your mouse to leave the window?
Any addition information would be helpful.