I am making a program with unity where I was going to make the program come to the front of the the screen. I was going to make it do this like every 15 min. and when I say front of the screen I mean over other windows like a internet browser. Is there a way to do this.
Only by writing a plugin.
The best way I could get about is to set screen resolution. This pops up the window on my machine but only if the the player first was fullscreen and then is windowed, and that it isn't minimized but just behind any other window. So it's probably not really ideal for your needs. For some reason I don't seem to get OnApplicationFocus event when I tab out of a fullscreen game...
Anyhow if you're interested anyway, here's my code for this test:
var popupTimer : float = 5;
Application.runInBackground = true;
function OnApplicationFocus (focus : boolean) {
if (focus)
CancelInvoke("Restore");
else
InvokeRepeating("Restore", popupTimer, popupTimer);
}
function Restore() {
Screen.SetResolution(Screen.currentResolution.width, Screen.currentResolution.height, Screen.fullScreen, Screen.currentResolution.refreshRate);
}
Using System32 api maybe?