MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / TakeScreenshot

Method TakeScreenshot

Source/Editor/Modules/WindowsModule.cs:167–184  ·  view source on GitHub ↗

Takes the screenshot of the current viewport.

()

Source from the content-addressed store, hash-verified

165 /// Takes the screenshot of the current viewport.
166 /// </summary>
167 public void TakeScreenshot()
168 {
169 // Select task
170 SceneRenderTask target = null;
171 if (Editor.Windows.EditWin.IsSelected)
172 {
173 // Use editor window
174 target = EditWin.Viewport.Task;
175 }
176 else
177 {
178 // Use game window
179 GameWin.FocusOrShow();
180 }
181
182 // Fire screenshot taking
183 Screenshot.Capture(target);
184 }
185
186 /// <summary>
187 /// Updates the main window title.

Callers

nothing calls this directly

Calls 2

FocusOrShowMethod · 0.80
CaptureMethod · 0.80

Tested by

no test coverage detected