Search Issue Tracker
Fixed in 2019.3.X
[Scripting] "ArgumentException: Object at index 0 is null" exception is thrown on deleting the script from Visual Studio
"ArgumentException: Object at index 0 is null" exception is thrown on deleting the script from Visual Studio.
Steps to repro:
1. Open the attached project.
2. Assets Menu > Open C# Project.
3. In Visual Studio, delete Test1.cs script from the Solution Explorer window.
4. Focus back to Unity Editor.
Script deleted with an exception in the Unity Console.
The script deletes.
Working Fine with:
Only on Windows
ArgumentException: Object at index 0 is null
UnityEditor.SerializedObject..ctor (UnityEngine.Object objs, UnityEngine.Object context) (at C:/buildslave/unity/build/Editor/Mono/SerializedObject.bindings.cs:39)
UnityEditor.Editor.GetSerializedObjectInternal () (at C:/buildslave/unity/build/Editor/Mono/Inspector/Editor.cs:553)
UnityEditor.Editor.get_serializedObject () (at C:/buildslave/unity/build/Editor/Mono/Inspector/Editor.cs:452)
UnityEditor.Experimental.AssetImporters.AssetImporterEditor.FixInspectorCache () (at C:/buildslave/unity/build/Modules/AssetPipelineEditor/ImportSettings/AssetImporterEditor.cs:203)
UnityEditor.AssemblyReloadEvents.OnAfterAssemblyReload () (at C:/buildslave/unity/build/Editor/Mono/AssemblyReloadEvents.cs:22)
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Element UI disappears and NullReferenceException is thrown when dragging off the last or first element from the list in the Inspector
- [Silicon] Crash on ScriptableRenderLoopJob when machine is left idle while the Editor is in Play mode
- [Android] GraphicsBuffer.CopyCount does not work with Append Compute Buffer after Compute Shader Dispatch on some Android devices
- "DirectoryNotFoundException" error when building a project via script in one folder, then building via Editor in another, deleting the folder built via Editor and rebuilding via Script
- New items are created and old ones remain in memory when using 'treeView.SetRootItems(items)' and 'treeView.Rebuild()' which can cause a memory leak