Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice

Resolved Unity 2019.4.23f1 Broke Prefabs and Project - NullReferenceException, ArgumentNullException

Discussion in 'Editor & General Support' started by studentvz, Apr 7, 2021.

  1. studentvz


    Dec 14, 2014
    Our sample project that works perfectly fine on all Unity versions from Unity 2017.4.32f1 to Unity 2019.4.21f is completely broken when opened with Unity 2019.4.23f1.

    We get NullReferenceExceptions, ArgumentNullExceptions, etc.

    We can run a scene and make a build, but the game is completely broken.

    Bug reported: 1327540
    *You can pull the same working project from a bug report that was reported on Unity 2019.4.18f1
    Last edited: Apr 7, 2021
  2. Kurt-Dekker


    Mar 16, 2013
    I'm sorry you've had this issue. Please consider using source control in order to guard and protect your hard-earned work.

    Personally I use git because it is free and there are tons of tutorials out there to help you set it up.

    Here's how I use git in one of my games, Jetpack Kurt:

    Using fine-grained source control as you work to refine your engineering:

    Share/Sharing source code between projects:

    Setting up the right .gitignore file:

    Now odds are it's only something trivially out of place, but GET YOUR PROJECT BACKED UP NOW FIRST!

    Finally, to investigate errors above, after you have backed up your project:

    Some notes on how to fix a NullReferenceException error in Unity3D
    - also known as: Unassigned Reference Exception
    - also known as: Missing Reference Exception
    - also known as: Object reference not set to an instance of an object

    The basic steps outlined above are:
    - Identify what is null
    - Identify why it is null
    - Fix that.

    Expect to see this error a LOT. It's easily the most common thing to do when working. Learn how to fix it rapidly. It's easy. See the above link for more tips.

    This is the kind of mindset and thinking process you need to bring to this problem:

    Step by step, break it down, find the problem.

    When you have identified more where the problem is, here is how to get help in the forums:

    How to report your problem productively in the Unity3D forums:

    How to understand compiler and other errors and even fix them yourself:

    If you post a code snippet, ALWAYS USE CODE TAGS:

    How to use code tags:
  3. studentvz


    Dec 14, 2014
    Thank you for this detailed info. We have backups and we also use git. This is a sample project which we use to test the new Unity versions and report bugs.

    Some references in our prefabs in the inspector are missing, like wheel colliders, wheel models, audio sources, and other stuff that were assigned and worked without any issue in Unity 2019.4.21. Prefabs are all messed up, we have many prefabs, many scenes, this is a nightmare.

    There is for sure some bug with prefabs and it is possibly connected with "fix" in Unity 2019.4.23f1:
    Asset Pipeline: Fixed an issue with Prefabs reimporting every time a code change is made. (1294785)

    We tried to rebuild our scene but there are many "hidden" issues, like ArgumentNullException: Value cannot be null. Parameter name: Source. The object that is pointed by this error is completely the same as in Unity 2019.4.21 with all references, and when we double-click this error we get:
    The path /Users/bokken/buildslave/unity/build/Modules/Audio/Public/ScriptBindings/Audio.bindings.cs' does not seem to exist anymore on disk.
  4. MrCool92


    Jul 13, 2015
    Same thing happened to us when going from 2019.4.22f to 2019.4.23f. Make sure to reimport all prefabs once or twice.
    studentvz likes this.
  5. studentvz


    Dec 14, 2014
    Thank you. Reimport fixed it.
    Unity 2019.4.23 reimported all while opening project and we didn't think that this could fix it.
  6. massiveminiteam


    Aug 28, 2018
    We had the same issue with two projects. So much for LTS version I guess.