private void Awake() { if (SDK == null) { SDK = this; } }
public override void BuildUIContent() { base.BuildUIContent(); CloseBtn = TargetGo.transform.Find("BG/CloseBtn").GetComponent <Button>(); CloseBtn.onClick.AddListener(CloseView); WeChatBtn = TargetGo.transform.Find("BG/WeChantBtn").GetComponent <Button>(); WeChatBtn.onClick.AddListener(OnClickWeChat); QQBtn = TargetGo.transform.Find("BG/QQBtn").GetComponent <Button>(); QQBtn.onClick.AddListener(OnClickQQ); MomentsBtn = TargetGo.transform.Find("BG/MomentsBtn").GetComponent <Button>(); MomentsBtn.onClick.AddListener(OnClickMoments); sharedemo = Camera.main.gameObject.GetComponent <ShareDemo>(); }