Version: 5.3 (switch to 5.4b)
IdiomaEnglish
  • C#
  • JS

Idioma de script

Selecciona tu lenguaje de programación favorito. Todos los fragmentos de código serán mostrados en este lenguaje.

ScriptableWizard.isValid

Sugiere un cambio

¡Éxito!

Gracias por ayudarnos a mejorar la calidad de la documentación de Unity. A pesar de que no podemos aceptar todas las sugerencias, leemos cada cambio propuesto por nuestros usuarios y actualizaremos los que sean aplicables.

Cerrar

No se puedo enviar

Por alguna razón su cambio sugerido no pudo ser enviado. Por favor <a>intente nuevamente</a> en unos minutos. Gracias por tomarse un tiempo para ayudarnos a mejorar la calidad de la documentación de Unity.

Cerrar

Cancelar

Cambiar al Manual
public var isValid: bool;
public bool isValid;

Descripción

Allows you to enable and disable the wizard create button, so that the user can not click it.

See Also: ScriptableWizard.OnWizardUpdate


The finish button gets disabled until the user sets the number to 5.


        
// Asks the user to set the var "Number" to 5, if is not set to 5
// the "Finish" button will not be reachable

using UnityEngine; using UnityEditor;

public class isValidScriptableWizard : ScriptableWizard { public int number = 0; [MenuItem ("Example/Show isValid Usage")] static void CreateWindow() { ScriptableWizard.DisplayWizard( "isValid boolean example", typeof(isValidScriptableWizard), "Finish"); } void OnWizardUpdate() { helpString = "Set The number to 5 and press finish"; if(number != 5) { errorString = "The number has to be set to 5!"; isValid = false; } else { errorString = ""; isValid = true; } } }