예제 #1
0
    protected override void Awake()
    {
        base.Awake();

        Screen.sleepTimeout = SleepTimeout.NeverSleep;
        Time.timeScale      = 1.0f;

#if SHADOW_PACK
        if (string.IsNullOrEmpty(m_shadowAppName))
        {
            Logger.LogWarning("Shadow app name can not be null! Use default name from config.");
            m_shadowAppName = null;
        }
#endif

#if !DEVELOPMENT_BUILD && !UNITY_EDITOR
        Debug.unityLogger.logEnabled = false;
#else
        m_loggerTimeTest    = e_LoggerTimeTest;
        m_disableLoggerTime = e_DisableLoggerTime;
        UpdateLoggerState();
#if !UNITY_EDITOR
        this.GetComponentDefault <DebugLogger>();
#endif
#endif

        m_defaultServer = __defaultServer;
        ServerConfigInfo.LoadServerInfos();

        var n = SDKManager.GetSafeInsets();
        m_safeInset = Util.ParseString <float>(n, false);
        if (m_safeInset.Length != 2)
        {
            m_safeInset = new float[2] {
                0, 0
            }
        }
        ;

        hasNotch = m_safeInset[0] > 0 || m_safeInset[1] > 0;

        Logger.LogDetail("Safe Inset: <color=#00FF00><b>[top:{0:F2},bottom:{1:F2}]</b></color>", m_safeInset[0], m_safeInset[1]);
    }