don't update chat UI in headless mode

This commit is contained in:
in0finite 2021-02-27 23:17:56 +01:00
parent f545981675
commit afb443d269
2 changed files with 4 additions and 1 deletions

View file

@ -19,7 +19,8 @@ namespace SanAndreasUnity.UI
void Start()
{
Chat.ChatManager.onChatMessage += OnChatMsg;
if (!F.IsInHeadlessMode)
Chat.ChatManager.onChatMessage += OnChatMsg;
}
void OnChatMsg(Chat.ChatMessage chatMsg)

View file

@ -931,6 +931,8 @@ namespace SanAndreasUnity.Utilities
}
public static bool IsInHeadlessMode => SystemInfo.graphicsDeviceType == UnityEngine.Rendering.GraphicsDeviceType.Null;
public static bool ScreenHasHighDensity => Application.isMobilePlatform;