函数变量没有出现在检查器 unity3d 中?

function varibles not showing up in the inspector unity3d?

我正在尝试创建一个函数变量,就像 UI 按钮中那样,但是当我使用创建 public 操作变量的代码时,它不会显示在检查员。

public Action jumpFunction;
 public Action dashFunction;

void Start()
    {
jumpFunction();
dashFunction();
}

您需要序列化 ​​Action 才能在编辑器中显示。