我有一个脚本:
[SerializeField]
private List<UnityAction> m_method = new List<UnityAction>();
private List<Button> m_button = new List<Button>();
void Start()
{
//init m_button
}
// this function is called when the player click on an object in game
void onClick()
{
for(int i=0; i<m_button.Count; i++)
m_button[i].AddListener(m_method[i]);
}
Run Code Online (Sandbox Code Playgroud)
我想从检查器中定义 unityAction,但检查器中没有出现任何内容...我认为它会类似于按钮组件:

有没有一种方法可以将操作绑定到检查器中带有序列化字段的按钮?