var foo = 'bar';
Getxxx is not allowed to be called from a ScriptableObject constructor (or instance field initializer), call it in OnEnable instead. Called from ScriptableObject 'FGConsole'.See "Script Serialization" page in the Unity Manual for further details.
解决方案
将报错函数写在enable里面
相关问题
GetBool is not allowed to be called from a ScriptableObject constructor (or instance field initializer), call it in OnEnable instead.