Inventory Engine v4.2
Loading...
Searching...
No Matches
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...

Inherits MonoBehaviour.

Public Types

enum  Methods { ScreenCapture , RenderTexture }
 the method to use to take the screenshot. More...

Public Attributes

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

Protected Member Functions

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

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: