VideoCameraDevice Class¶
Description¶
MonoBehaviour which controls CameraDevice in the scene, providing a few extensions in the Unity environment. Use VideoCameraDevice.Device directly when necessary.
Enums¶
public enum VideoCameraDevice.CameraDeviceOpenMethod |
Open method of CameraDevice . |
MonoBehaviour Messages¶
protected override void OnEnable() |
protected override void Start() |
protected override void OnDisable() |
protected virtual void OnDestroy() |
Fields¶
FocusMode¶
- C#
public CameraDeviceFocusMode FocusMode
Focus mode used only when create VideoCameraDevice.Device .
CameraSize¶
- C#
public Vector2 CameraSize
Camera preview size used only when create VideoCameraDevice.Device .
CameraOpenMethod¶
- C#
public VideoCameraDevice.CameraDeviceOpenMethod CameraOpenMethod
Camera open method used only when create VideoCameraDevice.Device .
CameraType¶
- C#
public CameraDeviceType CameraType
Camera type used only when create VideoCameraDevice.Device , used when VideoCameraDevice.CameraOpenMethod == VideoCameraDevice.CameraDeviceOpenMethod.DeviceType .
CameraIndex¶
- C#
public int CameraIndex
Camera index used only when create VideoCameraDevice.Device , used when VideoCameraDevice.CameraOpenMethod == VideoCameraDevice.CameraDeviceOpenMethod.DeviceIndex .
Properties¶
Device¶
- C#
public CameraDevice Device { get; }
EasyAR Sense API. Accessible between VideoCameraDevice.DeviceCreated and VideoCameraDevice.DeviceClosed event if available.
CameraPreference¶
- C#
public CameraDevicePreference CameraPreference { get; set; }
Camera preference used only when create VideoCameraDevice.Device . It will switch focus mode to the preferred value, change the focus after this value changed if it not the desired case.
Parameters¶
- C#
public CameraParameters Parameters { get; set; }
Camera parameters used only when create VideoCameraDevice.Device . It is for advanced usage and will overwrite other values like VideoCameraDevice.CameraSize .
Events¶
DeviceCreated¶
- C#
public event Action DeviceCreated
Event when VideoCameraDevice.Device created.
DeviceOpened¶
- C#
public event Action DeviceOpened
Event when VideoCameraDevice.Device opened.
DeviceClosed¶
- C#
public event Action DeviceClosed
Event when VideoCameraDevice.Device closed.
Methods¶
Open¶
- C#
public override void Open()
Open camera
Close¶
- C#
public override void Close()
Close camera