How can I turn on the phone flashlight?

+2 votes
asked Aug 2 by wjrivera (250 points)

1 Answer

+2 votes
answered Aug 3 by rlmidiaalvs (1,380 points)

Hello!

In ARSession.cs, you can call setFlashTorchMode(bool) in easyarCamera var

bool fls = false;

public void Torch () {

fls = !fls; easyarCamera.setFlashTorchMode (fls);

}

commented Aug 18 by aninuji (120 points)
Hi! I'm pretty much new and have no idea yet how to access to ARSession code tried with a sigleton in ARSession.cs but when i do in another script:
    public class Flash : MonoBehaviour
    {
        ARSession.singleton.Torch();
    }
It keeps telling me there's no property in ARSession! Any idea on why? Thanks
Welcome to EasyAR SDK Q&A, where you can ask questions and receive answers from other members of the community.
...