public static void Post(string input, bool postToLog, float postToScreenDuration)
{
if (postToLog)
{
Debug.Log(input);
}
if (postToScreenDuration > 0f && HighLogic.LoadedSceneIsFlight) // will only work in the flight scene, gives an error in other places.
{
ScreenMessages.PostScreenMessage(new ScreenMessage(input, postToScreenDuration, ScreenMessageStyle.UPPER_RIGHT));
}
}