您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
32 行
760 B
32 行
760 B
using UnityEngine;
|
|
|
|
namespace UnityEditor.Recorder
|
|
{
|
|
abstract class BaseRenderTextureInput : RecorderInput
|
|
{
|
|
public RenderTexture outputRT { get; set; }
|
|
|
|
public int outputWidth { get; protected set; }
|
|
public int outputHeight { get; protected set; }
|
|
|
|
protected void ReleaseBuffer()
|
|
{
|
|
if (outputRT != null)
|
|
{
|
|
if (outputRT == RenderTexture.active)
|
|
RenderTexture.active = null;
|
|
|
|
outputRT.Release();
|
|
outputRT = null;
|
|
}
|
|
}
|
|
|
|
protected override void Dispose(bool disposing)
|
|
{
|
|
base.Dispose(disposing);
|
|
|
|
if (disposing)
|
|
ReleaseBuffer();
|
|
}
|
|
}
|
|
}
|