Finding Object on Load

I have a gameobject that doesnt get destroyed when I load a new level. Each time I load a level I want it to change a variable by finding a new gameobject. I already have the code to make it find the gameobject but I dont know where to put it for it to be called everytime a level is loaded. I tried putting it in Start and Awake but neither worked.

void OnLevelWasLoaded()