using System; using System.Reflection; using AppsFlyerSDK; using UnityEngine; using UnityEngine.UI; public class OneLinkTest : MonoBehaviour { [SerializeField] private RootCtx ctx; [SerializeField] private GameObject btnContainer; [SerializeField] private GameObject btn; [SerializeField] private Text message; void Start() { ctx.OnInited += OnContextInited; } // Callback from GContex when its ready private void OnContextInited() { Boost(); } private async void Boost() { await Awaiters.NextFrame; TaInit(); InitAppsFlyer(); var aFInit = new AFInit(); aFInit.text = message; aFInit.text.text = $"Init AF {AppsFlyer.CallBackObjectName}\n";; var methods = aFInit.GetType().GetMethods(); foreach (var method in methods) { var btnAttr = method.GetCustomAttribute(); if (btnAttr == null) { continue; } var btnObj = Instantiate(btn, btnContainer.transform); btnObj.GetComponentInChildren().text = btnAttr.btnName; btnObj.GetComponent