OnBecameInvisible not working for Sprite

I have a 2d game I am using sprites on (so using sprite renderer, not sure if that is my problem) that is very similar to flappy birds. I have an empty GameObject that has a script attached to it that spawns prefabs of an object that has been dropped into the script (one empty GameObject has has attached the one that spawns ground sections, another the copies of the obstacle). My problem is that I cannot get OnBecameInvisible to run while the program is going and I cannot figure out why and was hoping for some suggestions. Below is what I am trying to run, and I have tried variations of it, but no dice.

void OnBecameInvisible(){ 
	Destroy (gameObject);				

I believe the OnBecameInvisible message is sent to scripts attached to the renderer that goes offscreen, so if it’s attached to your onscreen spawner game object, it will never be called.

Instead, put that in a script attached to the game object that should be destroyed.

you know what?try maximize the game window when you run you game in editor,if the sprite is visible in scene ,it still “visible”,check the API carefully.