Undo.PerformRedo 执行重做


static function PerformRedo () : void

Description描述

Perform an Redo operation.

执行一个重做操作。

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

这是类似于用户从编辑菜单选择重做(Redo...)。

参见:PerformUndo.

PerformRedo

Simple Scriptable Wizard that lets you perform an undo 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();}}}


,