docs.unity3d.com
    目次を表示する/隠す

    Class BaseTextureRecorder<T>

    Abstract base class for all Recorders that output images.

    Inheritance
    Object
    Recorder
    GenericRecorder<T>
    BaseTextureRecorder<T>
    Inherited Members
    GenericRecorder<T>.Settings
    Recorder.RecordedFramesCount
    Recorder.m_Inputs
    Recorder.Reset()
    Recorder.SessionCreated(RecordingSession)
    Recorder.SkipFrame(RecordingSession)
    Recorder.SkipSubFrame(RecordingSession)
    Recorder.Recording
    Namespace: UnityEditor.Recorder
    Syntax
    public abstract class BaseTextureRecorder<T> : GenericRecorder<T> where T : RecorderSettings
    Type Parameters
    Name Description
    T

    The class implementing the Recorder Settings.

    Fields

    UseAsyncGPUReadback

    Whether or not to use asynchronous GPU commands in order to get the texture for the recorder.

    Declaration
    protected bool UseAsyncGPUReadback
    Field Value
    Type Description
    Boolean

    Properties

    ReadbackTextureFormat

    Stores the format of the texture used for the readback.

    Declaration
    protected abstract TextureFormat ReadbackTextureFormat { get; }
    Property Value
    Type Description
    TextureFormat

    Methods

    BeginRecording(RecordingSession)

    Starts a new recording session. Callback is invoked once when the recording session starts.

    Declaration
    protected override bool BeginRecording(RecordingSession session)
    Parameters
    Type Name Description
    RecordingSession session

    The newly created recording session.

    Returns
    Type Description
    Boolean

    True if recording can start, False otherwise.

    Overrides
    Recorder.BeginRecording(RecordingSession)

    DisposeEncoder()

    Releases the encoder resources.

    Declaration
    protected virtual void DisposeEncoder()

    EndRecording(RecordingSession)

    Ends the current recording session. Callback is invoked when the recording session ends.

    Declaration
    protected override void EndRecording(RecordingSession session)
    Parameters
    Type Name Description
    RecordingSession session

    The current recording session.

    Overrides
    Recorder.EndRecording(RecordingSession)

    PrepareNewFrame(RecordingSession)

    Declaration
    protected override void PrepareNewFrame(RecordingSession ctx)
    Parameters
    Type Name Description
    RecordingSession ctx
    Overrides
    Recorder.PrepareNewFrame(RecordingSession)

    RecordFrame(RecordingSession)

    Records a single frame. Callback is invoked for every frame during the recording session.

    Declaration
    protected override void RecordFrame(RecordingSession session)
    Parameters
    Type Name Description
    RecordingSession session
    Overrides
    Recorder.RecordFrame(RecordingSession)

    WriteFrame(AsyncGPUReadbackRequest)

    Writes the frame from an asynchronous GPU read request.

    Declaration
    protected virtual void WriteFrame(AsyncGPUReadbackRequest r)
    Parameters
    Type Name Description
    AsyncGPUReadbackRequest r

    The asynchronous readback target.

    WriteFrame(Texture2D)

    Writes the frame from a Texture2D.

    Declaration
    protected abstract void WriteFrame(Texture2D t)
    Parameters
    Type Name Description
    Texture2D t

    The readback target.

    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)