• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Why getting errors SerializedObjectNotCreatableException: Object at index 0 is null and InvalidCastException: Specified cast is not valid.?

Resolved: Why getting errors SerializedObjectNotCreatableException: Object at index 0 is null and InvalidCastException: Specified cast is not valid.?

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

There are no any specific lines of any script in the errors. I tried to add animation to my character then deleted the animation and removed it from the animator controller and the errors happens.
I deleted everything from the hierarchy also in the assets deleted any packages assets i installed. and still the errors show.
I have this errors also in another project, started yesterday.
I’m using unity 2021.3.2f1 Personal
Each error show twice the same :
SerializedObjectNotCreatableException: Object at index 0 is null UnityEditor.Editor.CreateSerializedObject () (at :0) UnityEditor.Editor.GetSerializedObjectInternal () (at :0) UnityEditor.Editor.get_serializedObject () (at :0) UnityEditor.BaseAssetImporterTabUI.get_serializedObject () (at :0) UnityEditor.ModelImporterClipEditor.UnregisterListeners () (at :0) UnityEditor.ModelImporterClipEditor.OnDisable () (at :0) UnityEditor.ModelImporterEditor.OnDisable () (at :0)
And
InvalidCastException: Specified cast is not valid. UnityEditor.AssetImporters.AssetImporterEditor.InitializePostprocessors () (at :0) UnityEditor.AssetImporters.AssetImporterEditor.OnEnable () (at :0) UnityEditor.AssetImporterTabbedEditor.OnEnable () (at :0) UnityEditor.ModelImporterEditor.OnEnable () (at :0)

Answer:

Sometimes this happens if you have a second Inspector window open in Unity!
Try closing every Inspector window you can find. (It may be hiding somewhere weird.) Make sure the little lock icon in the top right is “unlocked.”
You can also reset your layout to factory settings through the Window menu, if you’re comfortable doing so.
After that, close all instances of Unity and re-open one of them. (For me it’s Window -> Layouts -> Revert Factory Settings...)
If the error is fixed, then you can get the Inspector back by going to Window -> Windows -> Inspector.
EDIT: Looking more closely, I see that the errors are referencing the Unity Asset Importer and the Model Importer. That makes me think even more that the window that looks like this (or something related to it) is bugging out:
Image of the Unity Inspector window, showing model import settings with tabs named "Model," "Rig," "Animation," and "Materials."

If you have better answer, please add a comment about this, thank you!

unity3d
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: TypeScript does not recognize properties when instantiating interface array

27/03/2023

Resolved: How to make statement case insensitive when uploading a dta file with specified columns?

27/03/2023

Resolved: Sort dataframe columns value by close it to another column

27/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.