# DisplayWizard

> Creates a wizard.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.0/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

## DisplayWizard\<T>(string)

Creates a wizard.

```csharp
public static T DisplayWizard<T>(string title) where T : ScriptableWizard
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The title shown at the top of the wizard window.

### Returns

| Type | Description |
| ---- | ----------- |
| T    | The wizard. |

### Remarks

When the user hits the Create button OnWizardCreate function will be called. DisplayWizard will only show one wizard for every wizard class.

![ScriptableWizardDisplayWizard (DisplayWizard)](/api/media?file=/engine/6000.0/media/images/ScriptableWizardDisplayWizard.png)

*Simple Wizard window that copies a GameObject several times.*

### Examples

```csharp
// Simple Wizard that clones an object.

using UnityEngine;
using UnityEditor;
using System.Collections;

public class ScriptableWizardDisplayWizard : ScriptableWizard
{
    public GameObject objectToCopy = null;
    public int numberOfCopies = 2;
    [MenuItem("Example/Show DisplayWizard usage")]
    static void CreateWindow()
    {
        // Creates the wizard for display
        ScriptableWizard.DisplayWizard("Copy an object.",
            typeof(ScriptableWizardDisplayWizard),
            "Copy!");
    }

    void OnWizardUpdate()
    {
        helpString = "Clones an object a number of times";
        if (!objectToCopy)
        {
            errorString = "Please assign an object";
            isValid = false;
        }
        else
        {
            errorString = "";
            isValid = true;
        }
    }

    void OnWizardCreate()
    {
        for (int i = 0; i < numberOfCopies; i++)
            Instantiate(objectToCopy, Vector3.zero, Quaternion.identity);
    }
}
```

## DisplayWizard\<T>(string, string)

Creates a wizard.

```csharp
public static T DisplayWizard<T>(string title, string createButtonName) where T : ScriptableWizard
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The title shown at the top of the wizard window.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The text shown on the create button.

### Returns

| Type | Description |
| ---- | ----------- |
| T    | The wizard. |

### Remarks

When the user hits the Create button OnWizardCreate function will be called. DisplayWizard will only show one wizard for every wizard class.

## DisplayWizard\<T>(string, string, string)

Creates a wizard.

```csharp
public static T DisplayWizard<T>(string title, string createButtonName, string otherButtonName) where T : ScriptableWizard
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The title shown at the top of the wizard window.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The text shown on the create button.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The text shown on the optional other button. Leave this parameter out to leave the button out.

### Returns

| Type | Description |
| ---- | ----------- |
| T    | The wizard. |

### Remarks

When the user hits the Create button OnWizardCreate function will be called. DisplayWizard will only show one wizard for every wizard class.

## DisplayWizard(string, Type, string, string)

Creates a wizard.

```csharp
public static ScriptableWizard DisplayWizard(string title, Type klass, string createButtonName, string otherButtonName)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The title shown at the top of the wizard window.**** (\[Type]\(https\://learn.microsoft.com/dotnet/api/system.type)): The class implementing the wizard. It has to derive from [ScriptableWizard](/engine/6000.0/script-reference/unityeditor/scriptablewizard.md).**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The text shown on the create button.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The text shown on the optional other button. Leave this parameter out to leave the button out.

### Returns

| Type                                                                                | Description |
| ----------------------------------------------------------------------------------- | ----------- |
| [ScriptableWizard](/engine/6000.0/script-reference/unityeditor/scriptablewizard.md) | The wizard. |

### Remarks

When the user hits the Create button OnWizardCreate function will be called. DisplayWizard will only show one wizard for every wizard class.
