Looking Glass Documentation
Buy Looking GlassDiscord
  • Looking Glass User Guide
  • NEW! โœจLooking Glass Goโœจ
  • Displays
    • ๐Ÿ”ฎLooking Glass Go
      • โšกGet Started with Looking Glass Go
      • ๐Ÿ“ฑUsing the Go Mobile App
      • ๐Ÿ”†Liteformsโ„ข
      • ๐Ÿ–ฅ๏ธStandalone and Desktop Modes
      • ๐Ÿ”ŒPower and LED States
      • ๐Ÿช„Default Playlist
      • โญ๏ธWhat's Next?
      • ๐Ÿ‘œAccessories
      • โš™๏ธAdvanced Playlist Creation
      • โš™๏ธManual Firmware Update
      • โ“Common Troubleshooting Issues
    • ๐Ÿ”ฎLooking Glass 16" Light Field Displays
      • ๐Ÿช„Looking Glass 16" Light Field Display (Landscape)
      • ๐Ÿช„Looking Glass 16" Light Field Display (Portrait)
      • โ“Common Troubleshooting Issues
    • ๐Ÿ”ฎLooking Glass 32" Light Field Displays
      • ๐Ÿช„Looking Glass 32" Light Field Display (Landscape)
      • ๐Ÿช„Looking Glass 32" Light Field Display (Portrait)
      • โ“Common Troubleshooting Issues
    • ๐Ÿ”ฎLooking Glass 65" Light Field Display
    • ๐Ÿ”ฎLooking Glass Portrait
      • โšกGet Started with Looking Glass Portrait
      • ๐ŸŽ‡Demo Holograms
      • โ“Common Troubleshooting Issues
  • Software
    • ๐Ÿ“šOverview
    • ๐ŸŒ‰Looking Glass Bridge
      • โœจUsing Looking Glass Bridge
      • ๐ŸชŸDisplay Settings on Windows
      • ๐ŸŽDisplay Settings on macOS
      • ๐ŸงDisplay Settings on Linux
      • ๐Ÿ‘ทTroubleshooting
    • โš™๏ธLooking Glass Bridge SDK
      • ๐Ÿช›Web Application Integration
      • ๐Ÿ”ŒIntegrating Native Applications
      • ๐Ÿ““Native Function Reference
      • ๐ŸฆLooking Glass Core Migration Guide
    • ๐Ÿ”ŒUnity
      • โšกUsing Unity with Looking Glass
      • Setting up your Development Environment
      • Example Scenes
      • Prefabs
        • Hologram Camera
        • 3D Cursor
        • Dual Monitor Application
      • Script Reference
        • HologramCamera.cs
        • LKGDisplaySystem.cs
        • QuiltCapture.cs
        • Cursor3D.cs
        • OrbitControls.cs
        • BlockUploader.cs
        • MobileDMAController.cs
        • iOS Sample Scene Scripts
          • ChangeInteractionModality.cs
          • XYSlider.cs
          • XYSpotlight.cs
          • AudioRotateControl.cs
          • ModelController.cs
          • DemoIOSUIController.cs
          • PageHandler.cs
          • PageConnectHandler.cs
          • PageCalibrateHandler.cs
          • PageTestHandler.cs
          • DynamicAlcove.cs
      • Package Integrations
        • Built-in Render Pipeline Post-Processing
      • Developing for iOS
      • Depth of Field and Other Post-Processing Effects
      • Quilt Video Audio and Playback
      • Developing for Ultraleap Hand Tracking on Looking Glass
      • Looking Glass Pro (Legacy)
      • Additional Support
      • Change Log
    • ๐Ÿ“ฝ๏ธLooking Glass Studio
      • ๐Ÿ“šUsing Looking Glass Studio
      • ๐ŸŽฌHologram Video iOS App
      • RGB-D Photo / Video
      • Quilt Images / Video
      • iPhone Portrait Photos
      • Android Depth Photos
        • Samsung Portrait Mode
      • Light Field Photosets
      • Exporting Holograms
      • Troubleshooting
    • ๐Ÿ‘€Looking Glass Model Viewer
    • ๐ŸงŠLooking Glass Blocks
      • โœจConvert any image into a hologram
      • โฌ†๏ธUploading, editing and sharing Quilts
      • ๐ŸฅฝViewing your holograms on different platforms
    • ๐ŸŽจOther Creator Tools
      • ๐ŸนBlender
      • ๐Ÿ”ŒUnreal Engine
        • ๐Ÿ—’๏ธChange Log and Old Versions
        • ๐Ÿ’ฝInstalling the Unreal Engine plugin
        • ๐ŸŽฅUsing the Unreal Engine Plugin
          • Using the HoloPlay Capture
          • Exporting Quilt Images and Video with Sequencer
        • Accessing HoloPlay Data with Blueprint Scripting
        • Packaging the Project
        • Unreal Engine 4 (Legacy Support)
          • Unreal Engine 4 Quick Start
            • Using the HoloPlay Capture
            • Exporting Quilt Images and Video with Sequencer
      • ๐ŸŒWebXR
        • ๐Ÿ”ถPlayCanvas
        • 3๏ธโƒฃ3๏ธโƒฃ Three.JS
        • โš›๏ธReact-Three-Fiber
        • ๐ŸŒˆSpline
    • ๐ŸงชExperiments
      • ๐Ÿ”†Liteformsโ„ข
        • ๐ŸชŸGet Started on Windows
        • ๐ŸŽGet Started on MacOS
        • ๐Ÿง™Making Custom Liteforms
        • ๐ŸชConfigure Liteforms for Kiosk Setup
      • ๐Ÿ“ฝ๏ธMedia Encoder
        • โฉLooking Glass Media Encoder
    • ๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘Third Party Apps and Tools
      • ๐Ÿ—บ๏ธParaView
      • ๐Ÿ”ฌVTK (Visualization Toolkit)
      • ๐Ÿ—ก๏ธ3D Slicer
      • ๐Ÿ”ฉCommunity Made Tools & Projects
  • Key Concepts
    • ๐Ÿ”‘Hologram 101
      • ๐ŸŽ‰Making great holograms
      • ๐ŸŒŽHolograms in the real world
      • ๐Ÿ‘พHolograms, but virtual
    • ๐Ÿ”How does Looking Glass Work?
    • ๐Ÿ“ธVirtual Camera
    • ๐ŸงŠ3D Design Guidelines
      • Lighting
      • Post-Processing
      • Scene Composition
      • Materials & Textures
      • Performance
    • ๐Ÿ’กQuilts
      • ๐ŸŽฌQuilt Video Encoding
    • ๐Ÿ’กLight Fields
      • โšกLinear Light Field Capture
    • ๐Ÿ“ฝ๏ธFilming a Looking Glass
  • Tutorials
    • ๐Ÿ“ฑRunning Looking Glass Displays with iOS Devices
    • โ“‚๏ธCapturing Light Fields in Maya
    • ๐Ÿง‘โ€๐Ÿ”ฌUsing ShaderToy with Looking Glass
    • ๐ŸŽจSculpting with Adobe Medium and Looking Glass
    • ๐Ÿ”Turn Videogames Holographic with Refract
    • ๐Ÿ–๏ธBuilding with Leap Motion
  • Legacy
    • Legacy Hardware
      • ๐Ÿ”ปLooking Glass 8.9"
      • ๐Ÿ”ปLooking Glass 15.6"
      • ๐Ÿ”ปLooking Glass 8K
      • ๐Ÿ”ปLooking Glass 16"
      • ๐Ÿ”ปLooking Glass 32"
      • ๐Ÿ”ปLooking Glass Pro
    • Legacy Software
      • ๐Ÿ“ก3D Model Importer
        • 3D Model Importer App Guide
        • 3D Model Importer App Reference
      • ๐ŸŽญDiorama
        • Change Log
      • ๐ŸŽž๏ธDepth Recorder
      • ๐Ÿ“ธLightfield Photo App
      • ๐ŸLooking Glass Core Overview
      • ๐Ÿฝ๏ธLooking Glass Core SDK
        • C API Overview
          • HoloPlayCore.h
            • State Functions
            • General-Query-Functions
            • Device-Query-Functions
          • libHoloPlayCore.h
          • HoloPlayShaders.h
      • ๐Ÿ”ฐLooking Glass Core JS
        • API
          • HoloPlayCore.Client
          • HoloPlayCore.Message
          • HoloPlay Service Related
          • examples
  • ๐Ÿ’ฌContact Us
  • ๐Ÿ› ๏ธFAQ & Troubleshooting
Powered by GitBook

Follow us

  • Twitter
  • Instagram
  • LinkedIn
On this page
  • Fields & Properties
  • bool IsLoading
  • Methods
  • static LookingGlass.Toolkit.Display Get(int index)
  • static Task WaitForConnected()
  • static Task WaitForCalibrations()
  • static Task<bool> Reconnect()
  • static Task<bool> ReloadCalibrations()

Was this helpful?

  1. Software
  2. Unity
  3. Script Reference

LKGDisplaySystem.cs

Contains access to Looking Glass display calibration data for all currently-connected Looking Glass displays to the system.

Note that this class is NOT thread safe and is expected to only be accessed on the Unity main thread.

This class automatically connects to LKG Bridge on start (via static constructor, and InitializeOnLoad in the editor) and queries for connected displays, but you may manually call LKGDisplaySystem.Reconnect() or LKGDisplaySystem.ReloadCalibrations() yourself as well.

Additionally, LKG Bridge is queried every few seconds to detect device changes. LKG Bridge uses web sockets events to notify listeners of display changes, but these currently don't work with WebSocketSharp and Unity currently.

Fields & Properties

bool IsLoading

Is the system currently connecting to LKG Bridge and/or awaiting the list of connected LKG displays and their calibrations?

Methods

static LookingGlass.Toolkit.Display Get(int index)

Gets a copy of the LKG display in the array of connected displays that are found to be currently connected. int index is an arbitrary index, and should NOT be relied on for persistence.

static Task WaitForConnected()

If LKGDisplaySystem.Reconnect() is currently waiting to connect to LKG Bridge, this returns a Task that will complete once that connection has been established. If there is no in-progress connection attempt at the moment, a completed Task is returned instead.

static Task WaitForCalibrations()

Waits for all currently-pending requests resulting from LKGDisplaySystem.ReloadCalibrations() at the moment of calling this method.

Subsequent calls to LKGDisplaySystem.ReloadCalibrations() after this method is called will not be awaited in this call.

static Task<bool> Reconnect()

Attempts to asynchronously connect to Looking Glass Bridge and query it for the Looking Glass displays that are currently connected to your system.

Note that this is automatically called on start (via static constructor, and InitializeOnLoad in the editor), but you may manually call this method yourself as well.

This includes a call to LKGDisplaySystem.ReloadCalibrations().

static Task<bool> ReloadCalibrations()

Asynchronously queries LKG Bridge for all currently connected LKG displays, updates this class's list of them (see LKGDisplaySystem.LKGDisplayCount and LKGDisplaySystem.Get(int index)), and updates all Hologram Cameras to ensure they are targeting the correct, up-to-date displays.

Returns true upon successful calibration reload from LKG Bridge and successful handling of the data internally, false otherwise.

PreviousHologramCamera.csNextQuiltCapture.cs

Last updated 4 months ago

Was this helpful?

๐Ÿ”Œ