0
GetBool 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.
UnityEditor.EditorPrefs:GetBool(String, Boolean)
ScriptInspector.FGConsole:.cctor() (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGConsole.cs:65)
我有一個團結的錯誤調用。 上面的錯誤顯示在控制檯中,它不允許我將腳本附加到遊戲對象並編譯我的錯誤。 如何清除此錯誤?錯誤:GetBool不允許團結作爲資產使用腳本檢查後3從是ScriptableObject構造
我想我會嘗試從ScriptableObject構造函數中移除GetBool方法,呵呵。你寫過從ScriptableObject派生的任何類嗎?在那個構造函數中,你看起來不允許使用GetBool。向我們展示圍繞FGConsole.cs第65行的代碼,這是異常指向的地方。否則,我猜測Script Inpsector 3中存在一個錯誤。 – Maakep
這些腳本都是默認設置,所以我不知道該怎麼辦? –
static FGConsole() \t { \t \t _openLogEntriesInSi2 = EditorPrefs.GetBool(「ScriptInspector.OpenLogEntriesInSi2」,true); \t \t consoleWindowType = typeof(EditorWindow).Assembly.GetType(「UnityEditor.ConsoleWindow」); \t \t ....... –