当前位置: 首页 > news >正文

unity中的button中的onclick控制面板中四个参数的意思分别是什么

unity中的button中的onclick控制面板中四个参数的意思分别是什么

第一次用控制面板来写Onclick,看的晕乎乎的

21154d7a-c417-4fac-afd1-725c51867902

 

95156a75-ec92-49fd-9412-d868c619aa73

 Main Menu(Script)的全部代码

using UnityEngine;
using UnityEngine.SceneManagement;
using System.Collections;public class MainMenu : MonoBehaviour
{public void OnLevelLoadButton(Level level){Debug.Log("方法被调用了!level = " + level);LevelToLoad.level = level;StartCoroutine(LoadScene());}private IEnumerator LoadScene(){AsyncOperation asyncLoadLevel = SceneManager.LoadSceneAsync("TripleMatchCanoe", LoadSceneMode.Single);while (!asyncLoadLevel.isDone)yield return null;yield return new WaitForEndOfFrame();}}

2c79e245-75e5-4c8b-94d9-b3d9e979fb44

 纯属个人理解,如果有错,希望指正。