ref,out - sonygod/luaxe-nlua GitHub Wiki

--calling int obj::OutMethod1(int,out int,out int)
retVal,out1,out2=obj:OutMethod1(intVal)
--calling void obj::OutMethod2(int,out int)
retVal,out1=obj:OutMethod2(inVal) –retValsera nil
--calling int obj:RefMethod(int,ref int)
retVal,ref1=obj:RefMethod(inVal,ref)

current can only use untyped __ lua __("luacode");

haxe

     var dist : Float=0;
plane.Raycast (ray, dist);
return ray.GetPoint (dist);

and lua file much change to this

       local dist 
       local result
       result,dist=		plane:Raycast(ray)