using Assets.Scripts; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; public class NewsController : PFUIPanel { // Start is called before the first frame update void Awake() { content = transform.Find("Main").Find("Inner").Find("Content"); exit = transform.Find("Main").Find("Exit"); if (exit != null) { UIManager.AddEvent(exit.gameObject, EventTriggerType.PointerClick, (b) => { Close(); }); } Get(); } Transform content,exit; async void Get() { var r = await ConfigHelper.userApi.GetNotify(); if (r.result) { content.GetComponent().text = r.data.Value("Content"); //content.GetComponent().text } } // Update is called once per frame void Update() { } }