Skip to content

Scripts

This is meant to be an outline of the scripts included in the HoloPlay SDK and the most useful public members and functions available in each. Most of these scripts exist in the HoloPlay namespace, so include this line at the top of scripts you wish to use these in your project:

using HoloPlay; 

ButtonManager.cs

The ButtonManager class is a singleton which only gets instantiated if you are using Looking Glass button input in your application. Typical usage is with the static functions GetButton(), GetButtonUp(), and GetButtonDown(), which mirror the default Unity Input.GetKey() style functions. As an argument, they accept the enum ButtonType which corresponds to the buttons on the Looking Glass.

Example:

if (ButtonManager.GetButtonDown(ButtonType.SQUARE)) {
    DoAction();
}

Config.cs

Config is a static class which handles loading calibration. Each Looking Glass unit has a unique calibration that is read and used to process view sets (or quilts) into light field images. The calibrations actually get loaded into an array, in case there are multiple Looking Glass units connected.

There typically isn't any need for a user to access this class or the calibration values directly.

Capture.cs

One of the main components attached to the HoloPlay Capture prefab.

ControlsTest.cs

Used in the example scene to test the buttons on the Looking Glass device.

CursorHide.cs

CursorHide is used in the example scene to hide the mouse cursor in play mode.

DebugPrintout.cs

Used by the Quilt component to spawn a GUI displaying some debug information about the HoloPlay SDK.

ExtendedUICamera.cs

Used in the prefab HoloPlay UI Camera

MetadataHandler.cs

Handles reading and writing the quilt settings of a quilt image or video into the file itself.

Misc.cs

Holds various helper functions used by the SDK

OnDisplaySetupExample.cs

An example of how one might use the OnDisplaySetup callback of the ExtendedUICamera

OnViewRenderTest.cs

An example of how one can use the OnViewRender callback.

Quilt.cs

One of the main components attached to the HoloPlay Capture prefab.

SimpleQuit.cs

Used in the example application. Quits on escape key.

SimpleRotation.cs

Used in the example scene. Rotates the game object.