Search Unity

Bug NullReferenceException - Immediately Upon Opening New Project

Discussion in 'Unity Hub' started by Zubzii, Apr 21, 2023.

  1. Zubzii

    Zubzii

    Joined:
    Apr 21, 2023
    Posts:
    2
    Hi All - I just downloaded Unity for the first time and I am getting this error in the attached as soon as I open a new project. Any help would be much appreciated. Happy to give any more info, i am just not even sure what is helpful here.
     

    Attached Files:

  2. Zubzii

    Zubzii

    Joined:
    Apr 21, 2023
    Posts:
    2
    When i clock on it, it bring me to this code - specifically the if (data.Length < guidLenght + 1) return null section

    static string GetOrganizationNameFromData(string data)
    {
    // data is in format: 151d73c7-38cb-4eec-b11e-34764e707226-danipen-unity
    int guidLenght = 36;

    if (data.Length < guidLenght + 1)
    return null;

    return data.Substring(guidLenght + 1);
     
  3. xietongtong99

    xietongtong99

    Joined:
    Apr 21, 2023
    Posts:
    1
    hi, I think I just met the same error as you do. Then i just open window>package maneger, updated all packages, then the error just disappear.
     
    Santiblader and Chrismis like this.
  4. rigel_unity293

    rigel_unity293

    Joined:
    Jun 29, 2020
    Posts:
    13
    As soon as you update the Version control package in teh package manager, the error disappears
     
    Chrismis likes this.