代码引用 using UnityEngine.EventSystems; <button>().onClick.AddListener ( delegate() { doSomething(); } );