Search Unity

Bug NullReferenceException: Max Size: SerializedProperty is null

Discussion in 'Editor & General Support' started by NeilBec, Oct 5, 2022.

  1. NeilBec

    NeilBec

    Joined:
    Sep 20, 2022
    Posts:
    3
    Hi,

    have encountered a problem that i am not sure if it has to do with updating Unity. But one part of the Inspector is not responding from my project in my asset folder. i am getting the error message:
    NullReferenceException: Max Size: SerializedProperty is null
    UnityEditor.EditorGUI.BeginPropertyInternal (UnityEngine.Rect totalPosition, UnityEngine.GUIContent label, UnityEditor.SerializedProperty property)

    And also:

    PSDImporterEditor.OnInspectorGUI must call ApplyRevertGUI to avoid unexpected behaviour.

    My scripts in visual studio all have red squiggle lines now. and when i try to see the error in visual studio by clicking on the error in Unity. I get the message file not found.

    Please let me know if you can help with this. Thank you.
     

    Attached Files:

  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,697
    If the nullref is in Unity inspector code, it might help to do a reimport all, or reset layouts.

    This may help you with intellisense and possibly other Visual Studio integration problems:

    Sometimes the fix is as simple as doing Assets -> Open C# Project from Unity. Other times it requires more.

    Other times it requires you also nuke the userprefs and .vsconfig and other crufty low-value high-hassle files that Visual Studio tends to slowly damage over time, then try the above trick.

    Barring all that, move on to other ideas:

    https://forum.unity.com/threads/intellisense-not-working-with-visual-studio-fix.836599/

    Also, try update the VSCode package inside of Unity: Window -> Package Manager -> Search for Visual Studio Code Editor -> Press the Update button

    Also, this: https://forum.unity.com/threads/no-suggestions-in-vscode.955197/#post-6227874
     
  3. NeilBec

    NeilBec

    Joined:
    Sep 20, 2022
    Posts:
    3
    Hi Kurt,

    Thank you for reaching out to me and helping me. I have performed both the reset and reimport all, but this did not help. I have also check the links you provided. But the inspector is still not responding, i am still getting the NullRef error message in Unity. I cannot go further if the inspector section is not responding when i click on them. Please let me know what else this could be causing this error.
    Kind regards,
    O'Neil Beckford
     
  4. AnCermet

    AnCermet

    Joined:
    Oct 19, 2017
    Posts:
    1
  5. NeilBec

    NeilBec

    Joined:
    Sep 20, 2022
    Posts:
    3