How can I move an object every time I saw it?

Hi (sorry for my english but Im latin) so I have a homework called “Ghost 360”. I have to put a 360 video and a sprite of a ghost. My camera has “FPS camera” script. So the thing is, every time the camera see the ghost, the ghost must move to another position when the camera is watching, and Idk how to do that. Pls help.

I think the frustum culling disables the ghosts renderer when you can’t see it. So you could make a script something like this:

public class GhostMover : MonoBehaviour
{
     private void OnBecameVisible() 
     {
          transform.position = new Vector3(Random.Range(min, max), Random.Range(min, max), Random.Range(min, max);
     }
}

and attach it to the ghosts gameobject.