Main menu Scripting

You don’t actually need the reference at all if you aren’t using it for other stuff. Just plug the create widget into the add viewport and it will work.