Quick API

Switching Lightfield Mode

Lightfield mode can be changed using the LeiaDisplay Instance.
1
using LeiaLoft;
2
3
LeiaDisplay.Instance.DesiredLightfieldMode = LeiaDisplay.LightfieldMode.Off;
4
LeiaDisplay.Instance.DesiredLightfieldMode = LeiaDisplay.LightfieldMode.On;
Copied!
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.
1
using LeiaLoft;
2
3
LeiaCamera _LeiaCam = LeiaCamera.Instance;
4
_LeiaCam.convergenceDistance = 10f;
Copied!

Setting Baseline Scaling

Editor: Use the inspector to change the Convergence Distance variable on the LeiaCamera component that is attached to a Camera GameObject.
1
using LeiaLoft;
2
3
LeiaCamera _LeiaCam = LeiaCamera.Instance;
4
_LeiaCam.baselineScaling = 0.3f;
Copied!
Last modified 1yr ago