|
I want to make a dialog which ask user be sure to esc when user press esc!I show document say EditorUtility.DisplayDialog can do this!But It 's unityeditor class,I don't know how to use it! Document say "To use it you have to place your script in Assets/Editor inside your project folder" and I cound't put it in Gameobject like runtime api.Now how to use it?
(comments are locked)
|
|
An answer is "Well, by definition you can't do this. Sorry! UnityEditor is talking about classes which can only be used in the Editor (i.e, for development). Any classes which use the UnityEditor functions will not even be included in your builds, so there's no way of using them in an actual game. (unless you do something silly like make a distraction for unity developers which runs entirely in the Editor. That would be incredibly silly, but there's no reason why you can't do it)" What are you doing here? Just convert my comment into an answer, if it's that important to you.
Nov 03 '11 at 07:19 AM
syclamoth
So we can't use it in our games!?And what could it do? What is it exist reason?
Nov 03 '11 at 08:35 AM
noob22
It's for extending the editor, for in-game uses search for "Unity GUI" and you'll find plenty of results.
Nov 03 '11 at 08:38 AM
gfr
I think @noob22 is trying to get an OS-native external message window to appear. Unfortunately, outside of the Editor, Unity does not provide any easy way of doing this.
Nov 03 '11 at 08:43 AM
syclamoth
Right, worst case, just code your own GUI window to do it.
Nov 03 '11 at 08:49 AM
DaveA
(comments are locked)
|

Well, by definition you can't do this. Sorry! UnityEditor is talking about classes which can only be used in the Editor (i.e, for development). Any classes which use the UnityEditor functions will not even be included in your builds, so there's no way of using them in an actual game.
(unless you do something silly like make a distraction for unity developers which runs entirely in the Editor. That would be incredibly silly, but there's no reason why you can't do it)