Search Unity

Question Editor / Playmode works fine. Reference Errors in Build Mode

Discussion in 'Editor & General Support' started by si0ty, Dec 7, 2020.

  1. si0ty

    si0ty

    Joined:
    Jun 28, 2019
    Posts:
    24
    Hello Guys,

    so I wanted to test out my game and built it for Windows 64 bit. When I launch my game there are Null Reference Errors which doesn't appear in play mode /editor. Because of that, it's impossible something is not set up right because in play mode everything works fine.

    The problem seems to occure when I try to find a GameObject with "Find" as well as "FindObjectOfType". It seems like the built game is not able to find GameObjects in the scene. How is this possible and what can I do?

    I know "Find" is always not to good for performance and maybe you say: Just find the scripts on another way. But this seems like a big problem right?

    There are no other errors shown in the console.