Corgi Engine  v9.2
MoreMountains.Tools.MMScreenshot Class Reference

Add this class to an empty game object in your scene and it'll let you take screenshots (meant to be used in Editor) More...

Inheritance diagram for MoreMountains.Tools.MMScreenshot:

Public Types

enum  Methods { Methods.ScreenCapture, Methods.RenderTexture }
 

Public Attributes

string FolderName = "Screenshots"
 the name of the folder (relative to the project's root) to save screenshots to More...
 
Methods Method = Methods.ScreenCapture
 the selected method to take a screenshot with. More...
 
KeyCode ScreenshotShortcut = KeyCode.K
 the shortcut to watch for to take screenshots More...
 
int GameViewSizeMultiplier = 3
 the size by which to multiply the game view when taking the screenshot More...
 
Camera TargetCamera
 the camera to use to take the screenshot with More...
 
int ResolutionWidth
 the width of the desired screenshot More...
 
int ResolutionHeight
 the height of the desired screenshot More...
 
bool TakeScreenshotButton
 a test button to take screenshots with More...
 

Protected Member Functions

virtual void LateUpdate ()
 At late update, we look for input More...
 
virtual void DetectInput ()
 If the user presses the screenshot button, we take one More...
 
virtual void TakeScreenshot ()
 Takes a screenshot using the specified method and outputs a console log More...
 
virtual string TakeScreenCaptureScreenshot ()
 Takes a screenshot using the ScreenCapture API and saves it to file More...
 
virtual string TakeRenderTextureScreenshot ()
 Takes a screenshot using a render texture and saves it to file More...
 

Detailed Description

Add this class to an empty game object in your scene and it'll let you take screenshots (meant to be used in Editor)

Member Enumeration Documentation

◆ Methods

the method to use to take the screenshot. Screencapture uses the API of the same name, and will let you keep whatever ratio the game view has, RenderTexture renders to a texture of the specified resolution

Enumerator
ScreenCapture 
RenderTexture 

Member Function Documentation

◆ DetectInput()

virtual void MoreMountains.Tools.MMScreenshot.DetectInput ( )
protectedvirtual

If the user presses the screenshot button, we take one

◆ LateUpdate()

virtual void MoreMountains.Tools.MMScreenshot.LateUpdate ( )
protectedvirtual

At late update, we look for input

◆ TakeRenderTextureScreenshot()

virtual string MoreMountains.Tools.MMScreenshot.TakeRenderTextureScreenshot ( )
protectedvirtual

Takes a screenshot using a render texture and saves it to file

Returns

◆ TakeScreenCaptureScreenshot()

virtual string MoreMountains.Tools.MMScreenshot.TakeScreenCaptureScreenshot ( )
protectedvirtual

Takes a screenshot using the ScreenCapture API and saves it to file

Returns

◆ TakeScreenshot()

virtual void MoreMountains.Tools.MMScreenshot.TakeScreenshot ( )
protectedvirtual

Takes a screenshot using the specified method and outputs a console log

Member Data Documentation

◆ FolderName

string MoreMountains.Tools.MMScreenshot.FolderName = "Screenshots"

the name of the folder (relative to the project's root) to save screenshots to

◆ GameViewSizeMultiplier

int MoreMountains.Tools.MMScreenshot.GameViewSizeMultiplier = 3

the size by which to multiply the game view when taking the screenshot

◆ Method

Methods MoreMountains.Tools.MMScreenshot.Method = Methods.ScreenCapture

the selected method to take a screenshot with.

◆ ResolutionHeight

int MoreMountains.Tools.MMScreenshot.ResolutionHeight

the height of the desired screenshot

◆ ResolutionWidth

int MoreMountains.Tools.MMScreenshot.ResolutionWidth

the width of the desired screenshot

◆ ScreenshotShortcut

KeyCode MoreMountains.Tools.MMScreenshot.ScreenshotShortcut = KeyCode.K

the shortcut to watch for to take screenshots

◆ TakeScreenshotButton

bool MoreMountains.Tools.MMScreenshot.TakeScreenshotButton

a test button to take screenshots with

◆ TargetCamera

Camera MoreMountains.Tools.MMScreenshot.TargetCamera

the camera to use to take the screenshot with


The documentation for this class was generated from the following file: