Table of Contents

Class CameraServer

Namespace
Godot
Assembly
GodotSharp.dll

The CameraServer keeps track of different cameras accessible in Godot. These are external cameras such as webcams or the cameras on your phone.

It is notably used to provide AR modules with a video feed from the camera.

Note: This class is currently only implemented on macOS and iOS. On other platforms, no CameraFeeds will be available.

public static class CameraServer
Inheritance
CameraServer
Inherited Members

Properties

Singleton

public static CameraServerInstance Singleton { get; }

Property Value

CameraServerInstance

Methods

AddFeed(CameraFeed)

Adds the camera feed to the camera server.

public static void AddFeed(CameraFeed feed)

Parameters

feed CameraFeed

Feeds()

Returns an array of CameraFeeds.

public static Array<CameraFeed> Feeds()

Returns

Array<CameraFeed>

GetFeed(int)

Returns the CameraFeed corresponding to the camera with the given index.

public static CameraFeed GetFeed(int index)

Parameters

index int

Returns

CameraFeed

GetFeedCount()

Returns the number of CameraFeeds registered.

public static int GetFeedCount()

Returns

int

RemoveFeed(CameraFeed)

Removes the specified camera feed.

public static void RemoveFeed(CameraFeed feed)

Parameters

feed CameraFeed

Events

CameraFeedAdded

Emitted when a CameraFeed is added (e.g. a webcam is plugged in).

public static event CameraServer.CameraFeedAddedEventHandler CameraFeedAdded

Event Type

CameraServer.CameraFeedAddedEventHandler

CameraFeedRemoved

Emitted when a CameraFeed is removed (e.g. a webcam is unplugged).

public static event CameraServer.CameraFeedRemovedEventHandler CameraFeedRemoved

Event Type

CameraServer.CameraFeedRemovedEventHandler