当前位置:网站首页>Unity_ Code mode add binding button click event
Unity_ Code mode add binding button click event
2022-04-23 14:46:00 【The black dog ran forward】
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class MainPanel : MonoBehaviour
{
private void Awake()
{
// Code mode binding Click event
transform.Find("BtnTargetList").GetComponent<Button>().onClick.AddListener(OnTargetListButtOnClick);
transform.Find("BtnTargetAdd").GetComponent<Button>().onClick.AddListener(OnTargetAddOnClick);
}
// Click event
private void OnTargetListButtOnClick()
{
UiManager.Instance.TargetListPanel.Show();
}
// Click event
private void OnTargetAddOnClick()
{
Debug.Log(" banana split ");
}
}
版权声明
本文为[The black dog ran forward]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231425301806.html
边栏推荐
- 想要成为架构师?夯实基础最重要
- 利用 MATLAB 编程实现最速下降法求解无约束最优化问题
- Don't you know the usage scenario of the responsibility chain model?
- 你還不知道責任鏈模式的使用場景嗎?
- 在游戏世界组建一支AI团队,超参数的多智能体「大乱斗」开赛
- UML project example -- UML diagram description of tiktok
- [stc8g2k64s4] introduction of comparator and sample program of comparator power down detection
- [NLP] HMM hidden Markov + Viterbi word segmentation
- 1 - first knowledge of go language
- 八路抢答器系统51单片机设计【附Proteus仿真、C程序、原理图及PCB文件、元器件清单和论文等】
猜你喜欢

八路抢答器系统51单片机设计【附Proteus仿真、C程序、原理图及PCB文件、元器件清单和论文等】

51 MCU + LCD12864 LCD Tetris game, proteus simulation, ad schematic diagram, code, thesis, etc

1 - first knowledge of go language

OC 转 Swift 条件编译、标记、宏、 Log、 版本检测、过期提示

详解TCP的三次握手

51 MCU flowers, farmland automatic irrigation system development, proteus simulation, schematic diagram and C code

Electronic scale weighing system design, hx711 pressure sensor, 51 single chip microcomputer (proteus simulation, C program, schematic diagram, thesis and other complete data)

MDS55-16-ASEMI整流模块MDS55-16

电子秤称重系统设计,HX711压力传感器,51单片机(Proteus仿真、C程序、原理图、论文等全套资料)

Bingbing learning notes: take you step by step to realize the sequence table
随机推荐
Four ways of SSH restricting login
【Servlet】Servlet 详解(使用+原理)
Do (local scope), initializer, memory conflict, swift pointer, inout, unsafepointer, unsafebitcast, success
Eight way responder system 51 Single Chip Microcomputer Design [with Proteus simulation, C program, schematic diagram, PCB files, component list and papers, etc.]
Set up an AI team in the game world and start the super parametric multi-agent "chaos fight"
压缩映射定理
UML项目实例——抖音的UML图描述
成都控制板设计提供_算是详细了_单片机程序头文件的定义、编写及引用介绍
We reference My97DatePicker to realize the use of time plug-in
UML project example -- UML diagram description of tiktok
抑郁症治疗的进展
SHT11传感器的温度湿度监控报警系统单片机Proteus设计(附仿真+论文+程序等)
OpenFaaS实战之四:模板操作(template)
Swift - Literal,字面量协议,基本数据类型、dictionary/array之间的转换
8.4 循环神经网络从零实现
MDS55-16-ASEMI整流模块MDS55-16
线程同步、生命周期
qt之.pro文件详解
Matlab Simulink modeling and design of single-phase AC-AC frequency converter, with MATLAB simulation, PPT and papers
面试官:说一下类加载的过程以及类加载的机制(双亲委派机制)