How can I know Is RunInBackground

i am not ask how to run in background;
i ask if i set run in background = true;
how i know it backgroundrunning or not

NONONO! I mean if i set Application.runInBackground = true;

Now my Unity is playing; than if i select my Unity or Not, my Unity always running, but how can i know it running at a background thread or a foreground thread

I never tried OnApplicationFocus in combination with runInBackground, but i think it should work the same.

bool isInBackground = false;

void OnApplicationFocus(bool aState)
{
    isInBackground = !aState;
}

private void Awake(){
bool flag = Application.runInBackground;

    Debug.Log("Application running in background:"+flag);
}