My scene & a useful utility script

My Realm Rush scene - Iteration 1:


Also, though some people might find this simple script that I wrote handy. It allows you to use a defined key (‘c’ by default) to take high-res screenshots in the editor’s game mode (which will be saved in the project root folder). Just add it to an empty object and set whatever key you’d like use to take screenshots.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ScreenshotTaking : MonoBehaviour
{
    [SerializeField] KeyCode screenshotKey = KeyCode.C;
    int screenshotIndex = 0;
	
	// Update is called once per frame
	void Update()
    {
		if (Input.GetKeyDown(screenshotKey))
        {
            if (System.IO.File.Exists("Screenshot(" + screenshotIndex + ").png"))
            {
                screenshotIndex++;
            }
            ScreenCapture.CaptureScreenshot("Screenshot(" + screenshotIndex + ").png");
            screenshotIndex++;
        }
	}
}

ScreenshotTaking.cs.zip (470 Bytes)

4 Likes

Privacy & Terms