Skip to content

Instantly share code, notes, and snippets.

View tk009999's full-sized avatar
🇹🇼

AceLee tk009999

🇹🇼
View GitHub Profile
@tk009999
tk009999 / ShowFPS.cs
Created November 25, 2021 06:20 — forked from freemanlam/ShowFPS.cs
Show FPS in Unity
using UnityEngine;
using System.Collections;
public class ShowFPS : MonoBehaviour
{
const float fpsMeasurePeriod = 0.5f;
private int m_FpsAccumulator = 0;
private float m_FpsNextPeriod = 0;
private int m_CurrentFps;
@tk009999
tk009999 / SaveRenderTextureToFile.cs
Created January 11, 2023 15:30 — forked from krzys-h/SaveRenderTextureToFile.cs
[Unity] Save RenderTexture to image file
using UnityEngine;
using UnityEditor;
public class SaveRenderTextureToFile {
[MenuItem("Assets/Save RenderTexture to file")]
public static void SaveRTToFile()
{
RenderTexture rt = Selection.activeObject as RenderTexture;
RenderTexture.active = rt;