Search Unity

scene view throwing compiler errors

Discussion in 'General Discussion' started by cameronhatch, Apr 5, 2021.

  1. cameronhatch

    cameronhatch

    Joined:
    Jul 7, 2020
    Posts:
    2
    I am working on a game, and when I press play, I get an error saying

    ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index

    When I open this, it goes to the Scene View (Dock Area) scriptable object.

    None of my code references the scene view in any way.
    Does anybody know what these errors mean, or how to fix them?
     
  2. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    This thread almost certainly belong in scripting.

    What is the stack trace listed in the console? What is the full error text?
     
  3. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,144
    It belongs in editor and general support more than anything. Getting random errors like this before even adding scripts has become an infrequent and so far impossible to consistently replicate bug since I think late in the 2019 release, with stack traces going incomplete because Unity doesn't really offer full traces up at the level these errors are occurring, near as I can tell.

    That said, I've never run into one that affected compilation like this before.
     
    EternalAmbiguity likes this.