Skip to content

A editor tool used to take screenshots for documentation

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE
Unknown
LICENSE.meta
Notifications You must be signed in to change notification settings

ByronMayne/CaptureGroups

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Capture Groups

An easy to use Editor Tool for taking IMGUI screen shots for Editor Windows.

Demo

How to Use

To use capture groups is quite simple. Using the GUILayout system you must surround your code with the CaptureGroup.Begin(string savePath) and CaptureGroup.End(). This will mark your region as a group to be captured.

To take the screen shots call CaptureGroup.PreformCaputre(EditorWindow window). This will then save all the captures to disk at their defined path.

Sudo

Here is a block of example code

private class MyEditorWindow : EditorWindow
{
    /// <summary>
    /// Invoked by Unity to draw element for an editor window.
    /// </summary>
    public void OnGUI()
    {
        // Mark the start of a group
        CaptureGroup.Begin("Assets/ScreenShots/Label.png");
        {   
            // Everything inside here will be in the picture.
            GUILayout.Label("Hello World");
        }
        CaptureGroup.End();
        // The end of the picture.
        
        // A button to invoke the capture process
        if(GUILayout.Button("Preform Capture"))
        {
            // Start the capture.
            CaptureGroup.PreformCapture(this);
        }
    }
}

Debug

To visualize the captures use the CaptureGroup.ShowDebug option which will draw the green overlay.

In Development

  • The option to take a full screen shot and instead of cropping it draw a GUIStyle around the element.

About

A editor tool used to take screenshots for documentation

Resources

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE
Unknown
LICENSE.meta

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages