2024-07-22 17:08:02 +08:00
|
|
|
|
using PhxhSDK;
|
|
|
|
|
|
using System.Collections;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
2024-07-31 16:31:18 +08:00
|
|
|
|
public partial class TalkingDataInitTool
|
2024-07-22 17:08:02 +08:00
|
|
|
|
{
|
2024-07-31 16:31:18 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// TD<54><44><EFBFBD><EFBFBD>APPӦ<50><D3A6>ID
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
static string appID = "75029605700B4544950D77C9FF506D0D";
|
|
|
|
|
|
|
2024-07-22 17:08:02 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// <20><>ʼ<EFBFBD><CABC>TalkingData<74><61>AppId<49><64><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public static void Init()
|
|
|
|
|
|
{
|
2024-07-23 13:54:11 +08:00
|
|
|
|
TalkingDataSettings settings = null;
|
2024-07-22 17:08:02 +08:00
|
|
|
|
if (settings == null)
|
|
|
|
|
|
{
|
2024-07-31 16:31:18 +08:00
|
|
|
|
settings = ScriptableObject.CreateInstance<TalkingDataSettings>();
|
|
|
|
|
|
settings.appId = appID;
|
|
|
|
|
|
settings.channel = channel;//"test";
|
|
|
|
|
|
DebugUtil.Log("Init a default TalkingdataSettings");
|
2024-07-22 17:08:02 +08:00
|
|
|
|
}
|
|
|
|
|
|
if (settings != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (settings.appId == null || settings.appId == "")
|
|
|
|
|
|
{
|
|
|
|
|
|
Debug.LogError("TalkingData appId is null,check settings file in path: Resources/TalkingDataSettings");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
SDKManager.Instance.ApplicationParam = new List<string> { settings.appId, settings.channel };
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|