- Home /
PropertyHandler.cs 203 error not accessing materials of a model
I am importing a model and when I click on the model in the Inspector tab materials give me nothing ( while on other models I get the textures of the materials it consists ) and at the same time I get this error :
NullReferenceException: Object reference not set to an instance of an object UnityEditor.PropertyHandler.OnGUILayout (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:203) UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:8791) UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:8780) UnityEditor.ModelImporterMaterialEditor.DoMaterialsGUI () (at C:/buildslave/unity/build/Editor/Mono/ImportSettings/ModelImporterMaterialEditor.cs:364) UnityEditor.ModelImporterMaterialEditor.OnInspectorGUI () (at C:/buildslave/unity/build/Editor/Mono/ImportSettings/ModelImporterMaterialEditor.cs:162) UnityEditor.AssetImporterTabbedEditor.OnInspectorGUI () (at C:/buildslave/unity/build/Editor/Mono/Inspector/TabbedEditor.cs:147) UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor[] editors, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1367) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
So I can't assign any textures for this model.
I just started getting this error myself. Not sure how long it has been going on, as it's been a long time since I have had to do any importing/manipulating of models.
Just out of curiosity, where did your models originate? $$anonymous$$ine are FBX models from 3d Studio $$anonymous$$ax. I have some from $$anonymous$$ax 2016 and some from $$anonymous$$ax 2019. Same issue on both actually.
Answer by Zyrathius · Oct 23, 2018 at 06:37 PM
@Afassolas I did some more looking around and it appears that this is fixed in 2018.2.14 according to the issue tracker and is no longer taking votes. Hopefully that version will be pushed out soon.
Answer by DINmatin · Nov 12, 2018 at 10:46 AM
indeed the bug was fixed in 2018.2.14 but it reappeared in 2018.2.15
Answer by Afassolas · Nov 15, 2018 at 06:33 AM
this is a major bug making the engine useless!
I don't think it is soooo bad. I was able to attach custom materials to my 3d models but it is more work than before.
Actually I find it kind of akward that they fixed it and about two weaks later they just brought it back. I really wonder how their tests look like before they release stuff. Such a common use case should be covered.
Answer by TomateSalat · Nov 15, 2018 at 06:35 PM
Couldn't find it in the release notes but the update on 2018.2.16f1 fixed the problem for me (again)
Your answer
![](https://koobas.hobune.stream/wayback/20220612180737im_/https://answers.unity.com/themes/thub/images/avi.jpg)