(RealStatePtr L, ObjectTranslator translator, int idx)
| 944 | } |
| 945 | |
| 946 | static Type getType(RealStatePtr L, ObjectTranslator translator, int idx) |
| 947 | { |
| 948 | if (LuaAPI.lua_type(L, idx) == LuaTypes.LUA_TTABLE) |
| 949 | { |
| 950 | LuaTable tbl; |
| 951 | translator.Get(L, idx, out tbl); |
| 952 | return tbl.Get<Type>("UnderlyingSystemType"); |
| 953 | } |
| 954 | else if (LuaAPI.lua_type(L, idx) == LuaTypes.LUA_TSTRING) |
| 955 | { |
| 956 | string className = LuaAPI.lua_tostring(L, idx); |
| 957 | return translator.FindType(className); |
| 958 | } |
| 959 | else if (translator.GetObject(L, idx) is Type) |
| 960 | { |
| 961 | return translator.GetObject(L, idx) as Type; |
| 962 | } |
| 963 | else |
| 964 | { |
| 965 | return null; |
| 966 | } |
| 967 | } |
| 968 | |
| 969 | [MonoPInvokeCallback(typeof(LuaCSFunction))] |
| 970 | public static int XLuaAccess(RealStatePtr L) |
no test coverage detected