using System; using System.Collections; using System.Collections.Generic; using SolarEngine; using UnityEngine; using UnityEngine.Serialization; public class DotData : MonoBehaviour { public static DotData ins; [FormerlySerializedAs("应用的appKey")] [SerializeField] private string appKey; [FormerlySerializedAs("账户的userCode")] [SerializeField] private string userId; private void Awake() { if (ins!=null) { Destroy(gameObject); return; } ins = this; DontDestroyOnLoad(gameObject); SESDKBridge.Instance.prevInit(appKey); InitParams data = new InitParams(); data.userId = userId; data.appKey = appKey; SESDKBridge.Instance.init(data); } public void InitReadyCallback(SESDKBridge.InitReadyCalllBack ReadyCalllBack1) { SESDKBridge.Instance.addInitReadyCallback(ReadyCalllBack1); } public void SendEvent(string key,string v) { var properties = new Dictionary(); properties[key] = v; SESDKBridge.Instance.track(key,properties); } public void SendEvent(string key, object v) { var properties = new Dictionary(); properties[key] = v; SESDKBridge.Instance.track(key,properties); } }