Class Recorder
Inheritance
Namespace: EasyMobile
Assembly: cs.temp.dll.dll
Syntax
public sealed class Recorder : MonoBehaviour
Properties
AutoHeight
Determines whether the height should be computed automatically from the current width and aspect ratio.
Declaration
public bool AutoHeight { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
FramePerSecond
Gets the frame per second.
Declaration
public int FramePerSecond { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The frame per second. |
Height
Image height in pixels.
Declaration
public int Height { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The height. |
Length
The length of the GIF in seconds.
Declaration
public float Length { get; }
Property Value
Type | Description |
---|---|
System.Single | The length. |
State
Gets the current state of the recorder.
Declaration
public Recorder.RecorderState State { get; }
Property Value
Type | Description |
---|---|
Recorder.RecorderState | The state. |
TargetCamera
Gets the camera that this recorder operates on.
Declaration
public Camera TargetCamera { get; }
Property Value
Type | Description |
---|---|
Camera | The target camera. |
Width
Image width in pixels.
Declaration
public int Width { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The width. |
Methods
CalculateAutoHeight(Int32, Camera)
Calculates height based on the specified width and the aspect ratio of the specified camera.
Declaration
public static int CalculateAutoHeight(int width, Camera targetCam)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | width | Width. |
Camera | targetCam | Target camera. |
Returns
Type | Description |
---|---|
System.Int32 | The auto height. |
EstimateMemoryUse(Int32, Int32, Int32, Single)
Estimates the memory use by the recorder.
Declaration
public static float EstimateMemoryUse(int width, int height, int fps, float length)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | width | Width. |
System.Int32 | height | Height. |
System.Int32 | fps | Fps. |
System.Single | length | Length. |
Returns
Type | Description |
---|---|
System.Single | The memory use. |
IsRecording()
Determines whether a recording is in process.
Declaration
public bool IsRecording()
Returns
Type | Description |
---|---|
System.Boolean |
|
Record()
Starts recording.
Declaration
public void Record()
Setup(Boolean, Int32, Int32, Int32, Single)
Configures the recorder with the specified parameters. Use this to change the recorder settings in a script. This can't be done while recording is in progress.
Declaration
public void Setup(bool autoHeight, int width, int height, int fps, float length)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | autoHeight | If set to |
System.Int32 | width | Width. |
System.Int32 | height | Height, will be ignored if autoHeight is enable. |
System.Int32 | fps | Frame per second. |
System.Single | length | Length in seconds. |
Stop()
Stops recording.
Declaration
public AnimatedClip Stop()
Returns
Type | Description |
---|---|
AnimatedClip | The recorded clip, which could be empty if the recording was not started. |