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
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
GetFeed(int)
Returns the CameraFeed corresponding to the camera with the given index
.
public static CameraFeed GetFeed(int index)
Parameters
index
int
Returns
GetFeedCount()
Returns the number of CameraFeeds registered.
public static int GetFeedCount()
Returns
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
CameraFeedRemoved
Emitted when a CameraFeed is removed (e.g. a webcam is unplugged).
public static event CameraServer.CameraFeedRemovedEventHandler CameraFeedRemoved