0

所以我有一个可序列化类的数组,每个类都有自己的可序列化类数组,每个类都有一个 UnityEvent。

class a : ScriptableObject
{
    entry[] entries
}

[Serializable]
class entry
{
    option[] Options
}

[Serializable]
class option
{
    string name;
    UnityEvent action;
}

行动监察员

与普通检查员视图相反

普通检查员的例子

4

1 回答 1

1

您不能序列化 UnityEvent。您需要为此创建一个自定义类,如下所示: https ://answers.unity.com/questions/1275147/can-you-force-unity-to-serialize-a-unityevent-in-t.html

于 2018-03-12T14:06:28.870 回答