当前位置:网站首页>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
边栏推荐
- Master in minutes --- ternary operator (ternary operator)
- Chapter 7 of JVM series -- bytecode execution engine
- epoll 的 ET,LT工作模式———实例程序
- Sword finger offer II 019 Delete at most one character to get palindrome (simple)
- Matrix exchange row and column
- 多语言通信基础 06 go实现grpc的四种数据流模式实现
- 八路抢答器系统51单片机设计【附Proteus仿真、C程序、原理图及PCB文件、元器件清单和论文等】
- 【JZ46 把数字翻译成字符串】
- 剑指 Offer II 019. 最多删除一个字符得到回文(简单)
- Proteus simulation design of DC adjustable regulated power supply (with simulation + paper and other data)
猜你喜欢

想要成为架构师?夯实基础最重要

交通灯系统51单片机设计(附Proteus仿真、C程序、原理图及PCB、论文等全套资料)

《JVM系列》 第七章 -- 字节码执行引擎

QT actual combat: Yunxi calendar

L'externalisation a duré quatre ans.

555 timer + 74 series chip to build eight way responder, 30s countdown, proteus simulation, etc

剑指 Offer II 019. 最多删除一个字符得到回文(简单)

【JZ46 把数字翻译成字符串】

Swift protocol Association object resource name management multithreading GCD delay once

电容
随机推荐
MySQL error packet out of order
Advanced application of I / O multiplexing: Processing TCP and UDP services at the same time
Parameter stack pressing problem of C language in structure parameter transmission
MySQL报错packet out of order
【NLP】HMM隐马尔可夫+维特比分词
I thought I could lie down and enter Huawei, but I was confused when I received JD / didi / iqiyi offers one after another
Progress in the treatment of depression
Don't you know the usage scenario of the responsibility chain model?
Detailed explanation of C language P2 selection branch statement
利用 MATLAB 编程实现最速下降法求解无约束最优化问题
Find daffodils - for loop practice
OpenFaaS实战之四:模板操作(template)
SVN详细使用教程
PWM speed regulation control system of DC motor based on 51 single chip microcomputer (with complete set of data such as Proteus simulation + C program)
Detailed explanation of SAR command
SHT11传感器的温度湿度监控报警系统单片机Proteus设计(附仿真+论文+程序等)
51 Single Chip Microcomputer Design of traffic light system (with Proteus simulation, C program, schematic diagram, PCB, thesis and other complete data)
如何打开Win10启动文件夹?
TLC5615 based multi-channel adjustable CNC DC regulated power supply, 51 single chip microcomputer, including proteus simulation and C code
The art of automation