# OnWizardOtherButton()

> Allows you to provide an action when the user clicks on the other button.

## Definition

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

```csharp
public void OnWizardOtherButton()
```

### Remarks

This is the place where you can implement all the stuff that will be done if the user clicks the secondary option when calling DisplayWizard. Additional Resources: [ScriptableWizard.DisplayWizard](/engine/6000.6/script-reference/unityeditor/scriptablewizard/displaywizard.md) ![ScriptableWizardOnWizardOtherButton (OnWizardOtherButton())](/api/media?file=/engine/6000.6/media/images/ScriptableWizardOnWizardOtherButton.png) *ScriptableWizard with an "Other" button, in this case named "Info".*

### Examples

```csharp

// Display a window showing the distance between two objects when clicking the Info button.

using UnityEngine;
using UnityEditor;

public class ScriptableWizardOnWizardOtherButton : ScriptableWizard
{
    public Transform firstObject = null;
    public Transform secondObject = null;

    [MenuItem("Example/Show OnWizardOtherButton Usage")]
    static void CreateWindow()
    {
        ScriptableWizard.DisplayWizard("Click info to know the distance between the objects",
            typeof(ScriptableWizardOnWizardOtherButton), "Finish!", "Info");
    }

    void OnWizardUpdate()
    {
        if (firstObject == null || secondObject == null)
        {
            isValid = false;
            errorString = "Select the objects you want to measure";
        }
        else
        {
            isValid = true;
            errorString = "";
        }
    }

    // Called when you press the "Info" button.
    void OnWizardOtherButton()
    {
        float distanceObjs = Vector3.Distance(firstObject.position, secondObject.position);
        EditorUtility.DisplayDialog(
            "The distance between the objects is: " + distanceObjs + " Units",
            "",
            "OK");
    }

    // Called when you press the "Finish!" button.
    void OnWizardCreate()
    {
    }
}
```
