using DaCruz.ScreenshotKit;using UnityEngine;public class PhotoMode : MonoBehaviour{ public ScreenshotKitCapture capture; void Awake() { capture.OnCaptured += path => Debug.Log($"Saved {path}"); } public void TakePhoto() { string path = capture.Capture(); }}
Capture() returns the saved file path, and OnCaptured fires with the same path after each successful capture (hotkey or scripted).
The built-in hotkey needs the legacy Input Manager. On the new Input System, leave Capture On Hotkey off and call Capture() from your own input action instead.