Search Unity

Load is not allowed to be called during serialization.....

Discussion in 'Editor & General Support' started by Wrymnn, Aug 27, 2016.

  1. Wrymnn

    Wrymnn

    Joined:
    Sep 24, 2014
    Posts:
    380
    I get a lot of errors each time scripts get recompiled:

    Load is not allowed to be called during serialization, call it from Awake or Start instead.

    How do I turn this off? Its extremely annoying.
    Each constructor of my every C# class is called and this is where this error comes from. Since I am calling Resources.Load from them. But in game, it runs okay.

    Please help.