Skip to content

LUA API Reference

mika edited this page Jan 22, 2018 · 29 revisions

Contents


Example Script

b = BinooAPI
b:CreateSphere("red",1,3,0,0)
b:AddGazeTarget("red")
b:AddEvent("red","CLICK","ClickCorrect","myparams")
function ClickCorrect(sender,params)
    b:ShowMessage("Clicked "..tostring(sender).." with params "..tostring(params))
    b:ClearObjects()
end

More examples: https://github.com/NTUSPMS/BinooAPI

LUA Unity API reference

Common Errors

  • "ScriptRuntimeException: attempt to call a nil value", maybe you missed "b:" in front of the method? or "math." in front of "random()"
Clone this wiki locally