Avoid recording Selection Changes as Undo records?

Does anyone know how to avoid recording Selection.activeObject changes in the Undo history? Since we added Selection.activeObject = calls there’s now up to twice as many undo operations required to undo anything (e.g. change text in three nodes requires five undo operations to reverse due to two activeObject changes). Just wondering if there’s some obscure way to prevent it.

Oddly the Unity docs don’t even mention that you can set Selection.activeObject - it’s documented as a return value only.

There isn’t any method I’ve encountered, and it would be surprising if Unity put one in, as a selection change is something generally expected in an undo system.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms