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


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


    Attached Files:

  2. Kurt-Dekker


    Mar 16, 2013
    This specific error, coming from this location (eg, NOT your code, such as
    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):

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


    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

    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__


    Feb 26, 2014
    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.