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. Dismiss Notice

Unity is giving me back an error- still lets me run game

Discussion in '2D' started by Noomin, Apr 8, 2021.

  1. Noomin

    Noomin

    Joined:
    Aug 20, 2020
    Posts:
    1
    NullReferenceException: Object reference not set to an instance of an object
    UnityEditor.GameObjectInspector.ClearPreviewCache () (at <d6a6a4b561b9431dbfe2c61f7bf0d405>:0)
    UnityEditor.GameObjectInspector.OnDisable () (at <d6a6a4b561b9431dbfe2c61f7bf0d405>:0)
    UnityEditor.Tilemaps.GridPaintPaletteClipboard:OnDisable() (at D:/Program Files/2020.3.2f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.2d.tilemap/Editor/GridPaintPaletteClipboard.cs:347)

    this is the error- problem is its not with one of my scripts but a unity one
    the line of code is:
    if (m_Owner && previewUtility != null && previewUtility.camera != null)

    If you need more info I will add.
    does anyone understand why unity is throwing this up?
    Game works just fine also.
     
  2. JackHolman

    JackHolman

    Joined:
    Jun 28, 2019
    Posts:
    9
    I have no idea what is causing that but my editor seems to throw similar errors quite a lot. I also haven't encountered any issues with the game at runtime.

    It's probably nothing to worry about, though if you really don't like them I would recommend updating Unity and seeing if the error is still present there.