public override void DoUndo() { //Undo.UndoData_newheights = Undo.Current.Scmap.Teren.terrainData.GetHeights(0, 0, Undo.Current.Scmap.Teren.terrainData.heightmapWidth, Undo.Current.Scmap.Teren.terrainData.heightmapHeight); if (!RedoGenerated) { if (Id == 1) { Undo.UndoData_StratumId = Id; Undo.UndoData_Stratum = Undo.Current.Scmap.map.TexturemapTex2.GetPixels(); } else { Undo.UndoData_StratumId = Id; Undo.UndoData_Stratum = Undo.Current.Scmap.map.TexturemapTex.GetPixels(); } HistoryStratumPaint.GenerateRedo(Undo.Current.Prefabs.StratumPaint).Register(); } RedoGenerated = true; DoRedo(); }
public void RegisterStratumPaint(Color[] colors, int id) { UndoData_Stratum = colors; UndoData_StratumId = id; HistoryStratumPaint.GenerateUndo(Prefabs.StratumPaint).Register(); }