Ends the actor piloting mode.
()
| 217 | /// Ends the actor piloting mode. |
| 218 | /// </summary> |
| 219 | public void EndPilot() |
| 220 | { |
| 221 | if (_pilotActor == null) |
| 222 | return; |
| 223 | |
| 224 | if (Editor.Undo.Enabled) |
| 225 | { |
| 226 | ActorNode node = Editor.Scene.GetActorNode(_pilotActor); |
| 227 | bool navigationDirty = node.AffectsNavigationWithChildren; |
| 228 | var action = new TransformObjectsAction |
| 229 | ( |
| 230 | new List<SceneGraphNode> { node }, |
| 231 | new List<Transform> { _pilotStart }, |
| 232 | ref _pilotBounds, |
| 233 | navigationDirty |
| 234 | ); |
| 235 | Editor.Undo.AddAction(action); |
| 236 | } |
| 237 | _pilotActor = null; |
| 238 | _pilotWidget.Parent.Visible = false; |
| 239 | } |
| 240 | |
| 241 | private void SceneOnActorRemoved(ActorNode actorNode) |
| 242 | { |
no test coverage detected