title: How to create dialogbox in Unity (not using UnityEditor)?
body: <p>I want to use dialog boxes (having two options). </p>
  
  <p>I tried UnityEditor, but when I build the project to create an exe file, it didn't work because scripts having UnityEditor references are just working in edit mode. After searching on the Internet for hours, there were two suggestions (both didn't work). </p>
  
  <p><strong>First one</strong>: Using <code>#if UNITY_EDITOR</code> before code and ending with <code>#endif</code>. In this case, It was built without an error but there were no dialog boxes in my game at all. </p>
  
  <p><strong>Second one</strong>: Putting the script under Assets/Editor directory. In this case, I couldn't add the script to my game object. Maybe, creating a new script under Editor directory and pasting UnityEditor used lines in it would work but I couldn't figured out how to do this. </p>
  
  <p>I used:</p>
  
  <pre><code>#if UNITY_EDITOR
  if (UnityEditor.EditorUtility.DisplayDialog("Game Over", "Again?", "Restart", "Exit"))
              {
                  Application.LoadLevel (0); 
              }
              else
              {
                  Application.Quit();
              }
  #endif
  </code></pre>
  
  <p>I also tried adding " using UnityEditor; " and encapsulating it with the preprocessor command I mentioned. It is also useless.</p>
  
  <p>Is there anyone knowing how to use UnityEditor in run mode or how to create dialog boxes in a different way?</p>