Quantcast
Viewing all articles
Browse latest Browse all 102

using UnityEditor.EditorUtility.DisplayDialog with ios

I have this code here #if UNITY_EDITOR bool yesWasClicked = UnityEditor.EditorUtility.DisplayDialog("Alert" , "Are u sure ?", "Yes" , "No"); #endif It's run great in pc , but when i build to ios the dialog didn't show up , and i don't know why , the game still running . I want to show a dialog when click a button void OnGUI() { if ( GUI.Button( // Center in X, 1/3 of the height in Y new Rect( Screen.width / 2 - (buttonWidth / 2), (1 * Screen.height / 3) - (buttonHeight / 2), buttonWidth, buttonHeight ), "Do it" ) ) { #if UNITY_EDITOR yesWasClicked = UnityEditor.EditorUtility.DisplayDialog("Alert" , "Are u sure ?","Yes" , "No"); #endif } } Or anyone have an idea to do that without using UnityEditor , i'm a newbie , pls show me how to do it :D

Viewing all articles
Browse latest Browse all 102

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>