Any way to bring Unity3d to the foreground? -
i have sent user out browser application.openurl
. , want programatically bring unity foreground.
is there way without plugin?
thanks.
if using unity3d in windows, try below code after calling application.openurl(...) :
[dllimport("user32.dll")] private static extern bool setforegroundwindow(intptr hwnd); var prc = process.getprocessesbyname("..."); //get unity's process, or var prc = process.getcurrentprocess(); if (prc.length > 0) setforegroundwindow(prc[0].mainwindowhandle);
Comments
Post a Comment