LogoLogo
Sign in to Leia Developer Portal
  • LeiaSR™ Documentation
  • LeiaSR SDK
    • LeiaSR™ Native SDK Guide
  • Unity Plugin
    • LeiaSR™ Unity Plugin Guide
      • Getting Started
      • Project Setup
      • Scene Setup
      • LeiaDisplay Component
        • Selecting Objects
        • Worldspace UI Canvas
      • Quick API
      • Extensions
        • Model Viewer Sample Scene
        • Android Live Preview: Leia Remote 2
        • Auto Focus
          • LeiaRaycastFocus
          • LeiaTargetFocus
          • LeiaDepthFocus
      • Content Design
        • Optimizing Object Placement
        • UI and Depth Violations
        • Depth of Field
        • Backgrounds
      • Render Pipeline Support
  • Unreal Plugin
    • Unreal SDK Guide
      • Getting Started
      • Manual Download And Import
      • Scene Setup
      • Quick API
      • Extensions
        • Android Live Preview: Leia Remote 2
      • Required Project Settings
      • Required Build Settings: Android
      • Content Design
  • NEURD SDK
    • NeurD SDK Guide
Powered by GitBook
On this page
  1. Unity Plugin
  2. LeiaSR™ Unity Plugin Guide
  3. Extensions
  4. Auto Focus

LeiaTargetFocus

PreviousLeiaRaycastFocusNextLeiaDepthFocus

The LeiaTargetFocus component takes a target GameObject as a parameter and will keep that object in focus based on it's mesh vertices.

Pros

  • Makes it easy to always keep a desired target game object in focus.

  • Doesn't require using shaders which write to the depth buffer (unlike ).

  • Doesn't require setting up colliders in your scene (unlike ).

Cons

  • Tradeoff between accuracy and performance depending on how many samples are taken.

  • More samples yields better accuracy but reduced performance.

  • Less samples yields less accuracy but better performance.

Unique Parameters:

  • Samples

    • How many mesh vertices to take as sample points for determining depth factor and focal distance. Larger sample count will be more costly performance-wise.

  • Target

    • The target game object to focus on. Child objects of the target game object will also be taken into account in the auto focus algorithm.

LeiaDepthFocus
LeiaRaycastFocus