今天在對很多對象身上的腳本的參數進行配置,自己就將對象進行了鎖定,擋把對象鎖定後,在運行遊戲的時候在控制檯拋出以下錯誤:
MissingReferenceException: The object of type 'AudioLoadAssetsBundle' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEditor.GenericInspector.GetOptimizedGUIBlock (Boolean isDirty, Boolean isVisible, UnityEditor.OptimizedGUIBlock& block, System.Single& height) (at C:/buildslave/unity/build/Editor/Mono/Inspector/GenericInspector.cs:19)
UnityEditor.InspectorWindow.FlushOptimizedGUIBlock (UnityEditor.Editor editor) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1430)
UnityEditor.InspectorWindow.FlushOptimizedGUI () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1420)
只需要將鎖定的對象關閉即可。