Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question NullReferenceExeption error

Discussion in 'Scripting' started by ThyGentleman, Sep 11, 2023.

  1. ThyGentleman

    ThyGentleman

    Joined:
    Sep 11, 2023
    Posts:
    1
    I cannot for the life of me figure out what is wrong and how to make this error go away.

    upload_2023-9-11_17-28-59.png
     

    Attached Files:

  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    37,130
    This specific error, coming from this location (eg, NOT your code, such as
    UnityEditor.Graphs
    or PlasticSCM as in your case above), is often fixed by either Reset Layouts (upper right) or else Right-click Project, Reimport-All.

    Extra unwanted packages in new projects (collab, testing, rider and other junk):

    https://forum.unity.com/threads/temp-unityengine-testrunner-dll-error.1133938/#post-7287748

    Sometimes the package system gets borked from all this unnecessary churn and requires the package cache to be cleared:

    https://stackoverflow.com/questions/53145919/unity3d-package-cache-errors/69779122



    ------------------------------

    Otherwise, if the error is in your code, it's always the same answer:

    The answer is always the same... ALWAYS!

    How to fix a NullReferenceException error

    https://forum.unity.com/threads/how-to-fix-a-nullreferenceexception-error.1230297/

    Three steps to success:
    - Identify what is null <-- any other action taken before this step is WASTED TIME
    - Identify why it is null
    - Fix that
     
    ThyGentleman likes this.
  3. _geo__

    _geo__

    Joined:
    Feb 26, 2014
    Posts:
    1,137
    1) Welcome to the Unity forum :)

    2) Remove that PlasticSCM folder in your PackageCache (path is in the error message) and maybe try to also uninstall the plastic scm package (I assume you are not using it anyways).
     
    ThyGentleman likes this.