Table of Contents

Workflow_FrameSource_CameraDevice Sample Details

Workflow_FrameSource_CameraDevice is a sample scene focused on low-level control of Frame Source, demonstrating how to use CameraDeviceFrameSource to obtain raw image streams from the camera and perform basic controls.

How to use

1. Open the scene

In the Unity editor, open the Workflow_FrameSource_CameraDevice scene, located in the Assets/ directory.

2. Build and run

  • Click Play in the editor to view the effect on PC (some features are limited).
  • Must build to a real device to fully experience the basic camera control capabilities.

After launching the app, the rear camera will automatically open.

Expected effect

When the camera is aimed at the surrounding environment:

  1. The real-time camera feed will be displayed on the screen.
  2. A 3D animated panda model will be rendered.
  3. The UI will show the current camera status (e.g., resolution, FPS).
  4. Click the Loop Size button to switch the supported output frame resolution of the current camera.
  5. Click the Flash Torch button to turn off/on the flashlight.
  6. Click HorizontalFlip to toggle mirror display of the current image.
  7. Click CaptureIamge to toggle whether the model captures the current environment as its own texture.
  8. Click CameraImage to toggle whether to display the current camera feed.
  9. Click Camera to turn off/on the current camera. When turned off, the image will remain unchanged from its state before closing.
  10. Use the NextCamera button to dynamically switch between front/rear cameras.

Tip

For more details on FrameSource, refer to:

Through Workflow_FrameSource_CameraDevice, you can gain in-depth mastery of EasyAR's control capabilities over underlying camera resources, laying a solid foundation for building high-performance, highly customizable AR applications.