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