I am working through the popwindow sample code provided in the documentation here. So far my code opens up an instance of PopupExample when user clicks on a sprite. But I am unable to understand how PopupExample's position and size is being determined. The line below from the sample code, is setting the activator rect of PopupExample to buttonRect. And buttonRect is initialized to default values, which should be x=0f; y=0f; width=0f; height=0f.
When I run the code and click on the sprite, the popupwindow shows up on the upper-left corner of the IDE(screenshot below). I was expecting it show up somewhere within the scene itself. Why is it not contained within the scene? Also how can a widow with width and height initialized to 0f be visible at all?