This version of Unity is unsupported.

GUIUtility.hasModalWindow

public static bool hasModalWindow;

Description

A global property, which is true if a ModalWindow is being displayed, false otherwise.