History Undo/Redo
With the History Tracker component setup you can include buttons in your Character Creation Menu that undo or redo changes you've previously setup.
Setup
Setup is extremely simple:
- Add the
button
and CCMTimelineButtonHandler component to any game object. - Assign the
Button
reference to theCCMTimelineButtonHandler
component. - Set the mode to either Undo or Redo.
- Set the buttons On Click event to call
CCMTimelineButtonHandler.UndoOrRedo
.
Note
A CCM History Tracker
component must be present somewhere in the menu contents for the Undo/Redo buttons to be functional.
If the undo or redo action is invalid the button will be disabled until valid again.
A prefab already exists where everything is already setup.
Tip
Prefabs Location: Prefabs > Character Creator > History > Undo-Redo