title: How to use async in Unity with Firebase
body: <p>So I'm trying to use Firebase in my Unity project, I've never done anything with async related stuff and I'm not understanding how to work around this issue.</p>
  
  <pre><code>public DatabaseData GetData()
  {
      DatabaseData data = new DatabaseData();
      reference.GetValueAsync().ContinueWith(task =&gt;
      {
          if (task.IsFaulted)
          {
              Debug.Log("error");
          }
          else if (task.IsCompleted)
          {
              DataSnapshot snapshot = task.Result;
              // Do something with snapshot...
              Debug.Log("hit");
          }
      });
      return data;
  }
  </code></pre>
  
  <p>So I've tried following what's going on in the function, and noticed that it returns before it has hit the <code>Debug.Log("hit")</code> which results in having an empty variable returned.<br>
  I tried searching around and seeing people use coroutines but that won't let me return any data.  </p>