今天在对很多对象身上的脚本的参数进行配置,自己就将对象进行了锁定,挡把对象锁定后,在运行游戏的时候在控制台抛出以下错误:
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)
只需要将锁定的对象关闭即可。