CameraDeviceBaseBehaviour is the component to control CameraDevice in the AR scene.
It contains the entrance of AR chain, OpenAndStart .
Below code shows how to dynamically switch to Front camera when the Back camera is being used and the track is running.
ARBuilder.Instance.CameraDeviceBehaviours.Close(); ARBuilder.Instance.CameraDeviceBehaviours.CameraDeviceType = CameraDevice.Device.Front; ARBuilder.Instance.CameraDeviceBehaviours.OpenAndStart();
Overwritten MonoBahaviour Functions¶
protected virtual void OnDestroy() protected virtual void Start()
Device type to open. It must be set before OpenAndStart.
Camera fps. The set must be called before OpenAndStart.
Camera size. The set must be called before OpenAndStart.
bool HorizontalFlip (since 1.3.0)¶
The horizontal flip flag. When set, the camera image will be horizontal flipped from default.
Whether to open device and start capture at the MonoBehaviour.Start. If false, you must call OpenAndStart to bootup the AR chain.
The CameraDevice object. You can reach advanced controls with Device. See CameraDevice for more details.
Closes the camera and the whole connected AR chain will stop. You can change bindings using bind calls and camera devices using CameraDeviceType. Call OpenAndStart to restart.
This is start point of the AR scene. All connections (all bind calls) except ImageTargetBaseBehaviour.Bind must be done before calling this function. It will use the connections established in the bind calls to bootup the whole AR scene.
Stops the capture. All connections and configurations are kept unchanged. See CameraDevice.Stop for more details.
event Action<CameraDeviceBaseBehaviour, bool> DeviceStart¶
The event for after OpenAndStart called.