Skip to content

GeneralD/SnapshotAsset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SnapshotAsset (ZYXW RectSnap)

engine language platform status

SnapshotAsset hero banner

A legacy Unity asset (2017, built with Unity 5.2.0f3) for taking in-game snapshots at runtime. The captured area is specified with a RectTransform, so you can crop exactly the region covered by a UI element — no extra code required for basic use.

Features

  • Region capture via RectTransform — the snapshot is cropped to the world rect of a target UI element
  • Two capture backends with automatic selection (Recommended mode):
    • RenderTexture — used in the Editor and on desktop platforms
    • Application.CaptureScreenshot — used on iOS/Android, where the RenderTexture path was unreliable at the time
  • UI hiding options during screenshot capture (DontHide / InvisibleCanvas / InvisibleTargetRectUI)
  • Inspector integration — custom editors with contextual tips and warnings, plus a no-code CaptureSnapshotHelper that exposes a UnityEvent<Texture> callback
  • Scene gizmo marking the capture area
  • Sample scene and a usage PDF included

Requirements

  • Unity 5.2 era (created with 5.2.0f3). Modern Unity versions will require migration: Application.CaptureScreenshot was replaced by ScreenCapture.CaptureScreenshot in Unity 2017.1+.

Usage

  1. Open Assets/ZYXW RectSnap/Scenes/Sample.unity and run it to see the asset in action.
  2. Add CaptureSnapshot to a GameObject, assign the Target Area (RectTransform) and Source Camera.
  3. Either call TakeSnapshot(Action<Texture>) from code, or add CaptureSnapshotHelper, wire its UnityEvent<Texture> callback in the Inspector, and call Snap().
GetComponent<CaptureSnapshot>().TakeSnapshot(texture => {
    // use the cropped Texture
});

Project Structure

Assets/ZYXW RectSnap/
├── Scripts/        # CaptureSnapshot, CaptureSnapshotHelper
├── Editor/         # Custom inspectors with tips
├── Scenes/         # Sample scene
├── Textures/       # Sample frame texture
└── Documentation/  # ReadMe.txt, Usage.pdf

Status

This is a legacy asset-store-style package from 2017 and is not actively maintained. The APIs it relies on have changed in modern Unity; treat it as a reference implementation.

About

Legacy Unity 5.2 asset for runtime snapshots cropped to a RectTransform region (ZYXW RectSnap, 2017).

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages