Search Unity

Feedback Improve undo/redo API/backend

Discussion in 'Scripting' started by Fatferret, Feb 20, 2021.

  1. Fatferret

    Fatferret

    Joined:
    Apr 20, 2013
    Posts:
    18
    Hello,

    I am currently working on a system that works on large amounts of data and I just keep banging my head on the limitations of the undo/redo API:

    - Texture2D undo's only support up to about 3000x3000'ish textures or it will start erroring about transaction size ( at least on my machine anyway ) Also undo's of Texture2Ds are horribly slow and not what you'd expect from just copying some texture data back through the GPU, I made a workaround for these issues but it is far less than ideal
    - There is no way of telling what was undone/redone or even if it was an undo or redo, I have a large tree of gameobjects that needs to be synced with the data but it is much to big and slow to incorporate it into the undo records, as a result I need to juggle with versions and other additional data just to be able to figure out what happened

    I understand the philosophy behind the undo system of recording snapshots of things, which is awesome for smaller data, but for some larger cases that is just too wasteful or slow.

    Can we have some additional Undo API to get more precise information about what is happening the moment an undo/redo happens?:
    - Was it an undo or redo?
    - What objects were changed?
    - What fields were changed and what from and to?

    Also have an increment of the Undo transaction size? Textures of 4096x4096 are quite common nowadays
     
    Madgvox likes this.