Search Issue Tracker
Fixed in 2019.1.X
Fixed in 2019.2.X
"ArgumentException: Object at index 0 is null" thrown when entering play mode with two Inspector windows and an attached script
How to reproduce:
1. Create a new project
2. Create a c# script and attach it to any object in the Hierarchy window
3. Add second Inspector window
4. Enter Play mode
5. Observe Console window
Expected result: no errors are thrown
Actual result: "ArgumentException: Object at index 0 is null" is thrown
Reproducible with: 2019.1.0b2, 2019.1.0f2, 2019.2.0a13, 2019.3.0a1
Not reproducible with: 2017.4.26f1, 2018.3.14f1, 2019.1.0b1
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Long Prefab save times when using Unity 2022.2 and higher
- Console displays error "UnityException: Creating asset at path Assets/Scenes/ .scenetemplate failed." during scene template saving
- "Development Build" watermark is shown in non-development UWP release builds
- Console errors appear when the Inspector is set to Debug and a GameObject is selected
- A script public variable value is not used when set in the Inspector window
Sep 30, 2020 11:49
Only strive to mention one's content can be as incredible. This clarity with your post is superb! Thanks a lot, hundreds of along with you should go on the pleasurable get the job done. http://188.8.131.52/selirqq/
Oct 14, 2019 17:56
This continues to happen for me in 2019.1.14f1 on Mac.
Is there any chance of getting the fix backported to 2019.1?
Aug 30, 2019 16:37
This still happens in MacOS Unity 2019.2.0f1
I had 2 Inspectors open. To fix I had to close both inspectors.
Aug 26, 2019 04:00
In 2019.2.0 it happens when you have 2 inspectors open.
Jul 21, 2019 02:47
Though I hate to add a "me, too" to this bug: I have noticed that I get the error when I have two inspectors open, and the FIRST inspector is showing (locked or unlocked) a GameObject with a script attached. No script? no error.
Jul 15, 2019 14:57
Still happens in Unity 2019.1.8f1, easily repro'd by the multiple mentions above ^
Jul 15, 2019 00:31
I've also managed to get this error on 2019.3.0a3 - Removing my second inspector window has prevented the error from showing up in the console and allows my editor scripts to execute properly.
Jul 09, 2019 05:58
The same issue after upgrading project from Unity 2018 to 2019.1.9f1.
I had 2 Inspector tabs open. If you close one the error should go away.
Jul 05, 2019 17:05
happens every time I hit play on 2019.1.8f1 on macOS
Jun 17, 2019 12:51
I only use one Editor and this exact error happens everytime I press play in all my projects since upgrade to 2019.