void ToggleHideInPlayMode(bool value) { if (actor == null) { return; } bool prevValue = actor.GetHideInPlayMode(); undoStack.PushUndoForActor( actor, $"Set hide for {actor.GetDisplayName()}", actor => { actor.SetHideInPlayMode(value); actor.ApplyPropertiesToClones(); }, actor => { actor.SetHideInPlayMode(prevValue); actor.ApplyPropertiesToClones(); }); }