while (wo != null) {
if (wo instanceof UINetwork) {
return (UINetwork)wo;
} else if (wo instanceof ElasticGround) {
World world = wo.getWorld();
if (world instanceof NodeViewer) {
wo = ((NodeViewer)world).getViewerParent();
} else {
wo = wo.getParent();
}