reckfellENGINE

CameraFeed

A camera feed gives you access to a single physical camera attached to your device.

On this page
class CameraFeedReckfellSharpInherits RefCounted

A camera feed gives you access to a single physical camera attached to your device.

A camera feed gives you access to a single physical camera attached to your device. When enabled, Reckfell will start capturing frames from the camera which can then be used. See also CameraServer. Note: Many cameras will return YCbCr images which are split into two textures and need to be combined in a shader. Reckfell does this automatically for you if you set the environment to show the camera image in the background. Note: This class is currently only implemented on Linux, Android, macOS, and iOS. On other platforms no CameraFeeds will be available. To get a CameraFeed on iOS, enable EditorExportPlatformIOS.modules/camera.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

CameraFeedConstructor
# CameraFeed
C#
public CameraFeed();

Properties3

FeedIsActiveProperty
# FeedIsActive
C#
public bool FeedIsActive { get; set; }

If true, the feed is active.

FeedTransformProperty
# FeedTransform
C#
public Transform2D FeedTransform { get; set; }

The transform applied to the camera's image.

FormatsProperty
# Formats
C#
public Reckfell.Collections.Array Formats { get; }

Formats supported by the feed. Each entry is a Reckfell.Collections.Dictionary describing format parameters.

Methods21

GetDatatypeCameraFeed.FeedDataType
# GetDatatype
C#
public CameraFeed.FeedDataType GetDatatype();

Returns feed image data type.

Returns CameraFeed.FeedDataType
GetFormatsReckfell.Collections.Array
# GetFormats
C#
public Reckfell.Collections.Array GetFormats();

Override this method to define supported formats of the camera feed.

Returns Reckfell.Collections.Array
GetIdint
# GetId
C#
public int GetId();

Returns the unique ID for this feed.

Returns int
GetNamestring
# GetName
C#
public string GetName();

Returns the camera's name.

Returns string
GetPositionCameraFeed.FeedPosition
# GetPosition
C#
public CameraFeed.FeedPosition GetPosition();

Returns the position of camera on the device.

Returns CameraFeed.FeedPosition
GetTextureTexIdulong
# GetTextureTexId
C#
public ulong GetTextureTexId(CameraServer.FeedImage feedImageType);

Returns the texture backend ID (usable by some external libraries that need a handle to a texture to write data).

Parameters
NameTypeDefault
feedImageTypeCameraServer.FeedImage—
Returns ulong
GetTransformTransform2D
# GetTransform
C#
public Transform2D GetTransform();
Returns Transform2D
IsActivebool
# IsActive
C#
public bool IsActive();
Returns bool
SetActivevoid
# SetActive
C#
public void SetActive(bool active);
Parameters
NameTypeDefault
activebool—
SetExternalvoid
# SetExternal
C#
public void SetExternal(int width, int height);

Sets the feed as external feed provided by another library.

Parameters
NameTypeDefault
widthint—
heightint—
SetFormatbool
# SetFormat
C#
public bool SetFormat(int index, Reckfell.Collections.Dictionary parameters);

Override this method to set the format of the camera feed.

Parameters
NameTypeDefault
indexint—
parametersReckfell.Collections.Dictionary—
Returns bool
SetNamevoid
# SetName
C#
public void SetName(string name);

Sets the camera's name.

Parameters
NameTypeDefault
namestring—
SetPositionvoid
# SetPosition
C#
public void SetPosition(CameraFeed.FeedPosition position);

Sets the position of this camera.

Parameters
NameTypeDefault
positionCameraFeed.FeedPosition—
SetRgbImagevoid
# SetRgbImage
C#
public void SetRgbImage(Image rgbImage);

Sets RGB image for this feed.

Parameters
NameTypeDefault
rgbImageImage—
SetTransformvoid
# SetTransform
C#
public void SetTransform(Transform2D transform);
Parameters
NameTypeDefault
transformTransform2D—
SetYcbcrImagevoid
# SetYcbcrImage
C#
public void SetYcbcrImage(Image ycbcrImage);

Sets YCbCr image for this feed.

Parameters
NameTypeDefault
ycbcrImageImage—
SetYcbcrImagesvoid
# SetYcbcrImages
C#
public void SetYcbcrImages(Image yImage, Image cbcrImage);

Sets Y and CbCr images for this feed.

Parameters
NameTypeDefault
yImageImage—
cbcrImageImage—
_ActivateFeedbool
# _ActivateFeed
C#
public virtual bool _ActivateFeed();

Called when the camera feed is activated.

Returns bool
_DeactivateFeedvoid
# _DeactivateFeed
C#
public virtual void _DeactivateFeed();

Called when the camera feed is deactivated.

_GetFormatsReckfell.Collections.Array
# _GetFormats
C#
public virtual Reckfell.Collections.Array _GetFormats();

Override this method to define supported formats of the camera feed.

Returns Reckfell.Collections.Array
_SetFormatbool
# _SetFormat
C#
public virtual bool _SetFormat(int index, Reckfell.Collections.Dictionary parameters);

Override this method to set the format of the camera feed.

Parameters
NameTypeDefault
indexint—
parametersReckfell.Collections.Dictionary—
Returns bool

Signals and events2

FormatChangedEvent
# FormatChanged
C#
public event Action FormatChanged;

Emitted when the format has changed.

FrameChangedEvent
# FrameChanged
C#
public event Action FrameChanged;

Emitted when a new frame is available.

CameraFeed.FeedDataType

ValueDescription
External = 4

Feed supplies external image.

Noimage = 0

No image set for the feed.

Rgb = 1

Feed supplies RGB images.

Ycbcr = 2

Feed supplies YCbCr images that need to be converted to RGB.

YcbcrSep = 3

Feed supplies separate Y and CbCr images that need to be combined and converted to RGB.

CameraFeed.FeedPosition

ValueDescription
Back = 2

Camera is mounted at the back of the device.

Front = 1

Camera is mounted at the front of the device.

Unspecified = 0

Unspecified position.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.