|
How can I show a custom dialog in the editor? I have a dialog I want to make, that contains some checkboxes and some other random controls. I want to show it to the user when they click on a button (in a custom inspector I have already made) in order to choose what to do. How would I go about doing this in Unity? I can only find dialog calls that are simple message boxes...
(comments are locked)
|
|
Are you looking for ScriptableWizards? They're like popup windows that you can add controls to. They allow you to set a bunch of values (even drag and drop game objects) and then execute code when different buttons are pressed. I think I can do what I need with a one-pane wizard. Thanks!
Oct 20 '11 at 02:15 PM
AntonStruyk
(comments are locked)
|
|
Unfortunately (AFAIK) there's no way to display an editor window as a modal window. The only thing that comes with Unity are the simple dialg boxes you've already found (EditorUtility.DisplayDialogComplex). Well, in a multitasking environment modal windows are evil, Just in some rare cases they would be helpful. Just check if you really need it modal. The user would be pleased when he still can select other things to look up some settings or whatever... A more or less related question: AssetModificationProcess.OnWillSaveAssets is a good example of a time when you might need a modal dialog. I want to present the user with various options for what to do (overwrite, skip, skip remaining, get SVN lock, etc.) and it needs to be modal because the method has to return an array of strings immediately.
Nov 17 '12 at 01:04 AM
yoyo
(comments are locked)
|
