How can I add variables from a preprocessor function to be used in an unformatted view template?
Your problem is that the output for the view is built up from the inside-out.  So, the views-view template already has the processed results from the views-view-unformatted template.

You should just be able to implement a template_preprocess_views_view_unformatted(), and do a manual check:

function mytheme_preprocess_views_view_unformatted(&amp;$variables) {
  $view = $variables['view'];

  if ($view-&gt;name == 'viewname') {
    $variables['foo'] = 'bar';
  }
}


I don't typically use unformatted output, but I do it somewhat often at the field level.