You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
to print the position of my gameobject, however it is trying to concatenate the actual Vector3 to "Object position: ", as opposed to the ToStringed version of the vector3.
Slua also can not seem to find the ToString methods if I try "Debug.Log ("Object position: " ... self.go.transform.position.ToString ()), or position:ToString().
The only way I am able to print the vector normally is Debug.Log (self.go.transform.position). print(self.go.transform.position) just prints the memory/table address as well, which is not desired.
Is there anyway to grab the ToString from a c# script/object member?
EDIT: Larger question: How do I access (or generate code for) the System namespace/functions from LuaJit so that I can use System.* classes?
The text was updated successfully, but these errors were encountered:
public static void OnAddCustomClass(LuaCodeGen.ExportGenericDelegate add)
{
add(typeof(System.Func), null);
add(typeof(System.Action<int, string>), null);
add(typeof(System.Action<int, Dictionary<int, object>>), null);
add(typeof(List), "ListInt");
add(typeof(Dictionary<int, string>), "DictIntStr");
add(typeof(string), "String");
// add your custom class here
// add( type, typename)
// type is what you want to export
// typename used for simplify generic type name or rename, like List named to "ListInt", if not a generic type keep typename as null or rename as new type name
}
HI,
I am trying to do something like this:
Debug.Log ("Object position: " .. self.go.transform.position);
to print the position of my gameobject, however it is trying to concatenate the actual Vector3 to "Object position: ", as opposed to the ToStringed version of the vector3.
Slua also can not seem to find the ToString methods if I try "Debug.Log ("Object position: " ... self.go.transform.position.ToString ()), or position:ToString().
The only way I am able to print the vector normally is Debug.Log (self.go.transform.position). print(self.go.transform.position) just prints the memory/table address as well, which is not desired.
Is there anyway to grab the ToString from a c# script/object member?
EDIT: Larger question: How do I access (or generate code for) the System namespace/functions from LuaJit so that I can use System.* classes?
The text was updated successfully, but these errors were encountered: