- Home /
How to access Vuforia C# library from Javascript
I found some code which uses Vuforia's library to switch on the camera's light in C#
ComeraDevice.Instance().SetFlashTorchMode(true);
The documentation for this class is here: https://developer.vuforia.com/resources/api/class_camera_device.htm
When I try this in UnityScript I get
BCE0005: Unknown identifier: 'CameraDevice'
How should I be calling the above function from UnityScript / JavaScript?
you could use C# with a class as an interface for JS SEND $$anonymous$$ESSAGE, it would be slow, but it could help
Answer by Julien-Lynge · Jan 11, 2013 at 06:58 PM
There is a script compilation order in Unity, and to access C# for JS or JS from C# you have to understand and use this order. Check out this page:
http://docs.unity3d.com/Documentation/ScriptReference/index.Script_compilation_28Advanced29.html
Answer by aandnota_ · Feb 25, 2014 at 03:22 PM
Julien, your link is broken. Here's an answer to the question.
Your answer
Follow this Question
Related Questions
What should i learn for unity C# or UnityScript? 4 Answers
A node in a childnode? 1 Answer
Including a DLL in unity? 1 Answer
Unable to check WALL to WALL check for tower defense game 0 Answers
Multiple Cars not working 1 Answer