Trigger won't recognise tag

I am trying to test that my trigger can recognize an object in it by its tag. The tag is on my player object and the script below is attached to the same game object as my trigger. When I run the game the word “Gravity” is printed in the console whenever my player is within the trigger, but “Tag is correct” is not. What do I need to do to get it to print?

  1. void OnTriggerStay(Collider ob) {

      print (ob.tag);
      if (ob.tag == "Gravity") {
      	print ("Tag is correct");


The code looks fine. To start with, go to the tag manager and copy the tag string, then paste that same string in here to make absolutely sure the two strings are the same…same case, no extra spaces, same spelling, etc.