12345678910111213141516171819202122232425262728 |
- using System;
- using UnityEngine;
- public class RenderTexSaveInObject : MonoBehaviour
- {
- private void Start()
- {
- }
- private void Update()
- {
- if (Input.GetKeyDown(KeyCode.T))
- {
- this.m_bKeyPress = true;
- }
- }
- public void OnPreRender()
- {
- }
- private void SaveRt()
- {
- UTY.SaveImage(base.GetComponent<Camera>().targetTexture, null, TextureFormat.ARGB32);
- }
- private bool m_bKeyPress;
- }
|