一运行就出现这样的错误,但给敌人的巡逻等功能能正常执行。
CreateInstanceFromType is not allowed to be called from a ScriptableObject constructor (or instance field initializer), call it in OnEnable instead. Called from ScriptableObject 'BehaviorDesignerWindow'.
See "Script Serialization" page in the Unity Manual for further details.
UnityEngine.ScriptableObject:CreateInstance()
BehaviorDesigner.Editor.BehaviorDesignerWindow:.ctor()
UnityEditor.EditorWindow:GetWindow(Boolean, String)
BehaviorDesigner.Editor.BehaviorDesignerWindow:ShowWindow()
BehaviorDesigner.Editor.BehaviorInspector:DrawInspectorGUI(Behavior, SerializedObject, Boolean, Boolean&, Boolean&, Boolean&)
BehaviorDesigner.Editor.BehaviorInspector:OnInspectorGUI()
UnityEditor.DockArea:OnGUI()