Undo.PerformRedo Manual     Reference     Scripting  
Scripting > Editor Classes > Undo
Undo.PerformRedo

static function PerformRedo () : void

Description

Perform an Redo operation.

This is similar to the user selecting Redo from the Edit menu.

See Also: PerformUndo.


Simple Scriptable Wizard that lets you perform a redo several times.

using UnityEngine;
using UnityEditor;

//Performs a Redo the number of times specified.

public class PerformVariousRedo : ScriptableWizard {
public int numberOfSteps = 5;


[MenuItem ("Example/Perform Various Redo %#r")]
static void ExecuteMenu() {
ScriptableWizard.DisplayWizard(
"Perform various Redo at the same time",
typeof(PerformVariousUndo),
"Redo!");
}

void OnWizardCreate() {
int savedNumberOfSteps = numberOfSteps;
for(int i = 0; i < savedNumberOfSteps; i++) {
Undo.PerformRedo();
}
}
}