70 lines
2.5 KiB
C#
70 lines
2.5 KiB
C#
//using Firebase.Auth;
|
|
//using Google;
|
|
using System.Collections;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.U2D;
|
|
|
|
#if UNITY_ANDROID
|
|
using UnityEngine.Android;
|
|
#endif
|
|
|
|
public class TitleInfo : MyCoroutine
|
|
{
|
|
public TextMeshProUGUI label_msg, t_ver;
|
|
|
|
IEnumerator Start()
|
|
{
|
|
t_ver.text = DSUtil.Format("{0}({1})", Application.version, "E or G or O");
|
|
label_msg.text = "게임 데이터를 읽고 있습니다.";
|
|
|
|
// 테이블 로딩 기다리기
|
|
while (!TableChecker.Ins.CheckAllLoad()) yield return null;
|
|
// UI 아틀라스 로드
|
|
yield return AddrResourceMgr.Ins.LoadObjectSequential<SpriteAtlas>("MainUI/UIAtlas.spriteatlasv2", atlas => { UIAtlasMgr.Ins.Set(atlas); });
|
|
|
|
label_msg.text = "로비로 진입 중입니다.";
|
|
yield return null;
|
|
|
|
//#if FGB_LIVE
|
|
// SRDebug.Instance.IsTriggerEnabled = false;
|
|
//#else
|
|
// SRDebug.Instance.IsTriggerEnabled = true;
|
|
//#endif
|
|
|
|
#if !UNITY_EDITOR && UNITY_ANDROID && !FGB_OneStore
|
|
if (!Application.version.Equals("9.9.9"))
|
|
if (Application.installerName != "com.android.vending")
|
|
{
|
|
Popup.Ins.Set(ePopupType.One, 2,
|
|
() => { Application.OpenURL("market://details?id=" + Application.identifier); DSUtil.Quit(); },
|
|
() => { Application.OpenURL("market://details?id=" + Application.identifier); DSUtil.Quit(); });
|
|
yield break;
|
|
}
|
|
#endif
|
|
#if UNITY_ANDROID
|
|
if (!Permission.HasUserAuthorizedPermission("android.permission.POST_NOTIFICATIONS"))
|
|
Permission.RequestUserPermission("android.permission.POST_NOTIFICATIONS");
|
|
#endif
|
|
#if !UNITY_EDITOR
|
|
// 파이어 베이스 초기화
|
|
Firebase.FirebaseApp.CheckAndFixDependenciesAsync().ContinueWith(task => {
|
|
var dependencyStatus = task.Result;
|
|
if (dependencyStatus == Firebase.DependencyStatus.Available)
|
|
{
|
|
//FirebaseAnalytics.SetAnalyticsCollectionEnabled(true);
|
|
}
|
|
else
|
|
{
|
|
Debug.LogError(DSUtil.Format( "Could not resolve all Firebase dependencies: {0}", dependencyStatus));
|
|
// Firebase Unity SDK is not safe to use here.
|
|
}
|
|
});
|
|
#endif
|
|
|
|
// 인앱 결제 정보 받아오기
|
|
//label_msg.text = table_localtext.Ins.Get_Text(3);
|
|
yield return new WaitForSeconds(0.1f);
|
|
|
|
}
|
|
} |