Quick API

Switching Lightfield Mode

Lightfield mode can be changed using the LeiaDisplay Instance.

using LeiaLoft;
LeiaDisplay.Instance.DesiredLightfieldMode = LeiaDisplay.LightfieldMode.Off;
LeiaDisplay.Instance.DesiredLightfieldMode = LeiaDisplay.LightfieldMode.On;

Editor: Use the dropdown on the LeiaDisplay Component.

The following API has been deprecated in 0.6.14+, replaced with Lightfield Mode.

LeiaDisplay.Instance.DesiredLeiaStateID = "HPO"; LeiaDisplay.Instance.DesiredLeiaStateID = "2D";

Setting Convergence Distance

Editor: Use the inspector to change the Convergence Distance variable on the LeiaCamera component attached to a Camera GameObject.

using LeiaLoft;
LeiaCamera _LeiaCam = LeiaCamera.Instance;
_LeiaCam.convergenceDistance = 10f;

Setting Baseline Scaling

Editor: Use the inspector to change the Convergence Distance variable on the LeiaCamera component that is attached to a Camera GameObject.

using LeiaLoft;
LeiaCamera _LeiaCam = LeiaCamera.Instance;
_LeiaCam.baselineScaling = 0.3f;