Search Unity

Get Error Line

Discussion in 'Scripting' started by JannikGabler, Jan 7, 2020.

  1. JannikGabler

    JannikGabler

    Joined:
    Jan 29, 2018
    Posts:
    4
    Hi,
    i made a Log Script which simply logs every Messag in the Console into a File. Now i got:

    21:01 -[ERROR]: NullReferenceException
    BuildingManager.StartHover (Building b) (at <99810ba8e7354ebea48b16392637f56d>:0)
    BuildingManager.UpdateHoverInfo () (at <99810ba8e7354ebea48b16392637f56d>:0)
    GameController.UpdateBuildingMonth () (at <99810ba8e7354ebea48b16392637f56d>:0)
    GameController.Update () (at <99810ba8e7354ebea48b16392637f56d>:0)

    My Problem is the StartHover function is pretty long and i have no plan where to search and "at <99810ba8e7354ebea48b16392637f56d>:0" doens´t help me. In the console itself it says in which line the error happend. Is there any possibility to find out what "at <99810ba8e7354ebea48b16392637f56d>:0" exactly means?
    Jannik
     
  2. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,775
    Is this being run in the Editor or in a build?

    If it's a build, make sure "Development Build" is checked in the build settings. If it isn't, then all the associations with line numbers are stripped out of the build.
     
  3. JannikGabler

    JannikGabler

    Joined:
    Jan 29, 2018
    Posts:
    4
    In a Build. I know but i did script which Logs the console in a File and if a error is logged it uploads the file to a server. Activate Development Build is nice but i can´t see the debug logs if it´s not my pc. So i did this solution with the log files, but i can´t see in what lane the error happend.
    Jannik