The godot.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 godot.CameraFeeds will be available.

Static variables

@:native("Singleton")staticread onlySINGLETON:Object

staticread onlyonCameraFeedAdded:Signal<(id:Int) ‑> Void>

camera_feed_added signal.

staticread onlyonCameraFeedRemoved:Signal<(id:Int) ‑> Void>

camera_feed_removed signal.

Static methods

@:native("AddFeed")staticaddFeed(feed:CameraFeed):Void

Adds the camera feed to the camera server.

@:native("Feeds")staticfeeds():Array

Returns an array of godot.CameraFeeds.

@:native("GetFeed")staticgetFeed(index:Int):CameraFeed

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

@:native("GetFeedCount")staticgetFeedCount():Int

Returns the number of godot.CameraFeeds registered.

@:native("RemoveFeed")staticremoveFeed(feed:CameraFeed):Void

Removes the specified camera feed.