{"record":{"id":"e6082b6feff6a008","repo":"Unity-Technologies/UnityCsReference","slug":"property","errorCode":null,"errorMessage":"property","messagePattern":"property","errorType":"validation","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"Editor/Mono/ObjectSelector.cs","lineNumber":604,"sourceCode":"        {\n            return (String.Equals(typeof(AudioMixerGroup).Name, typeStr));\n        }\n\n        internal void Show(Type requiredType, SerializedProperty property, bool allowSceneObjects, List<EntityId> allowedEntityIds = null, Action<UnityObject> onObjectSelectorClosed = null, Action<UnityObject> onObjectSelectedUpdated = null, bool allowBuiltinResources = true, bool excludeSceneAssets = false)\n        {\n            Show(new [] { requiredType }, property, allowSceneObjects, allowedEntityIds, onObjectSelectorClosed, onObjectSelectedUpdated, allowBuiltinResources, excludeSceneAssets);\n        }\n\n        internal void Show(Type[] requiredTypes, SerializedProperty property, bool allowSceneObjects, List<EntityId> allowedEntityIds = null, Action<UnityObject> onObjectSelectorClosed = null, Action<UnityObject> onObjectSelectedUpdated = null, bool allowBuiltinResources = true, bool excludeSceneAssets = false)\n        {\n            if (requiredTypes == null)\n            {\n                // Required type list handles null elements if a property exists.\n                requiredTypes = new Type [] { null };\n            }\n\n            if (property == null)\n                throw new ArgumentNullException(nameof(property));\n\n            // Don't select anything on multi selection\n            UnityObject obj = property.hasMultipleDifferentValues ? null : property.objectReferenceValue;\n\n            UnityObject objectBeingEdited = property.serializedObject.targetObject;\n            m_EditedProperty = property;\n\n            SharedShow(obj, new RequiredTypeList(requiredTypes, property), objectBeingEdited, allowSceneObjects, allowedEntityIds, onObjectSelectorClosed, onObjectSelectedUpdated, true, allowBuiltinResources, excludeSceneAssets);\n        }\n\n        internal void Show(UnityObject obj, Type requiredType, UnityObject objectBeingEdited, bool allowSceneObjects, List<EntityId> allowedEntityIds = null, Action<UnityObject> onObjectSelectorClosed = null, Action<UnityObject> onObjectSelectedUpdated = null, bool showNoneItem = true, bool allowBuiltinResources = true, bool excludeSceneAssets = false)\n        {\n            Show(obj, new Type[] { requiredType }, objectBeingEdited, allowSceneObjects, allowedEntityIds, onObjectSelectorClosed, onObjectSelectedUpdated, showNoneItem, allowBuiltinResources, excludeSceneAssets);\n        }\n\n        internal void Show(UnityObject obj, Type[] requiredTypes, UnityObject objectBeingEdited, bool allowSceneObjects, List<EntityId> allowedEntityIds = null, Action<UnityObject> onObjectSelectorClosed = null, Action<UnityObject> onObjectSelectedUpdated = null, bool showNoneItem = true, bool allowBuiltinResources = true, bool excludeSceneAssets = false)\n        {\n            SharedShow(","sourceCodeStart":586,"sourceCodeEnd":622,"githubUrl":"https://github.com/Unity-Technologies/UnityCsReference/blob/225b0fbdb57cc17d094e8056b71f8314aba56f73/Editor/Mono/ObjectSelector.cs#L586-L622","documentation":"Thrown by ObjectSelector.Show when the SerializedProperty argument is null. The object-selector requires a valid property to read objectReferenceValue and bind the edited target object.","triggerScenarios":"Calling ObjectSelector.Show(...) with property == null after the requiredTypes null-default branch.","commonSituations":"SerializedProperty lookup returned null because the property path was wrong or the serializedObject changed; editor code invoking the selector without checking the property exists.","solutions":["Verify the property path: serializedObject.FindProperty(\"path\") != null before calling Show.","Refresh the SerializedObject before property lookups.","Use the obj-based Show overload if you have a direct UnityObject reference instead."],"exampleFix":"// before\nvar prop = so.FindProperty(\"maybeMissing\");\nObjectSelector.get.Show(new[]{ typeof(Material) }, prop, ...);\n// after\nvar prop = so.FindProperty(\"maybeMissing\");\nif (prop == null) { Debug.LogError(\"property missing\"); return; }\nObjectSelector.get.Show(new[]{ typeof(Material) }, prop, ...);","handlingStrategy":"validation","validationCode":"var prop = so.FindProperty(\"path\");\nif (prop != null) ObjectSelector.get.Show(types, prop, ...);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Verify property paths before lookup.","Refresh the SerializedObject before FindProperty.","Use the obj-based Show overload when possible."],"tags":["unity","object-selector","serialized-property","validation"],"backgroundTag":null,"analyzedSha":"225b0fbdb57cc17d094e8056b71f8314aba56f73","analyzedAt":"2026-08-13T19:07:19.849Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}