You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
844 B
31 lines
844 B
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Reflection;
|
|
using System.Text;
|
|
using UnityEngine;
|
|
|
|
public class DebugDumper : MonoBehaviour
|
|
{
|
|
void Start()
|
|
{
|
|
var sb = new StringBuilder("SystemInfo:\n");
|
|
foreach (var property in typeof(SystemInfo).GetProperties(BindingFlags.Static | BindingFlags.Public))
|
|
{
|
|
sb.AppendLine($"- {property.Name} = {property.GetValue(null)}");
|
|
}
|
|
|
|
Debug.Log(sb);
|
|
}
|
|
|
|
void Update()
|
|
{
|
|
if (Input.GetKeyDown(KeyCode.F12))
|
|
{
|
|
string path = Path.Combine(Directory.GetCurrentDirectory(), $"screenshot-{DateTime.Now:yyyyMMdd-HHmmss}.png");
|
|
ScreenCapture.CaptureScreenshot(path);
|
|
Debug.Log($"Screenshot saved to: {path}");
|
|
}
|
|
}
|
|
}
|