title: Making a global function in Unity C#
body: <p>Could someone please point me to a tutorial that can make a global "back button" function in unity?</p>
  
  <p>Currently I am able to override it via "Update" function with this code</p>
  
  <pre><code>if (Input.GetKeyDown(KeyCode.Escape))
  {
     //Do something you need
     Debug.Log("Back button is pressed");
  }
  </code></pre>
  
  <p>The drawback, however, I need to attach this function in one active "Gameobject" in every scene.</p>
  
  <p>Is there perhaps any method to make this function globally and therefore this "Update" function always listening in every scene?</p>