Unity 重新加载脚本就报错!!,求大神帮忙看下!!

详细错误描述:NullReferenceException: Object reference not set to an instance of an object
UnityEditor.GameObjectInspector.ClearPreviewCache () (at <40513f04ef114c8db39ee74008ebaf26>:0)
UnityEditor.GameObjectInspector.OnDisable () (at <40513f04ef114c8db39ee74008ebaf26>:0)

 

还有:

SerializedObjectNotCreatableException: Object at index 0 is null
UnityEditor.Editor.CreateSerializedObject () (at <40513f04ef114c8db39ee74008ebaf26>:0)
UnityEditor.Editor.GetSerializedObjectInternal () (at <40513f04ef114c8db39ee74008ebaf26>:0)
UnityEditor.Editor.get_serializedObject () (at <40513f04ef114c8db39ee74008ebaf26>:0)
UnityEditor.GameObjectInspector.OnEnable () (at <40513f04ef114c8db39ee74008ebaf26>:0)

 

就是这个方法中ClearPreviewCache,访问了不存在的(已删除的)游戏对象