public decimal __Gen_Delegate_Imp8(decimal p0) { #if THREAD_SAFE || HOTFIX_ENABLE lock (luaEnv.luaEnvLock) { #endif RealStatePtr L = luaEnv.rawL; int errFunc = LuaAPI.pcall_prepare(L, errorFuncRef, luaReference); ObjectTranslator translator = luaEnv.translator; translator.PushDecimal(L, p0); PCall(L, 1, 1, errFunc); decimal __gen_ret; translator.Get(L, errFunc + 1, out __gen_ret); LuaAPI.lua_settop(L, errFunc - 1); return(__gen_ret); #if THREAD_SAFE || HOTFIX_ENABLE } #endif }
static Type getType(RealStatePtr L, ObjectTranslator translator, int idx) { if (LuaAPI.lua_type(L, idx) == LuaTypes.LUA_TTABLE) { LuaTable tbl; translator.Get(L, idx, out tbl); return(tbl.Get <Type>("UnderlyingSystemType")); } else if (LuaAPI.lua_type(L, idx) == LuaTypes.LUA_TSTRING) { string className = LuaAPI.lua_tostring(L, idx); return(translator.FindType(className)); } else if (translator.GetObject(L, idx) is Type) { return(translator.GetObject(L, idx) as Type); } else { return(null); } }
public Unity.Entities.Entity __Gen_Delegate_Imp46(object p0, long p1) { #if THREAD_SAFE || HOTFIX_ENABLE lock (luaEnv.luaEnvLock) { #endif RealStatePtr L = luaEnv.rawL; int errFunc = LuaAPI.pcall_prepare(L, errorFuncRef, luaReference); ObjectTranslator translator = luaEnv.translator; translator.PushAny(L, p0); LuaAPI.lua_pushint64(L, p1); PCall(L, 2, 1, errFunc); Unity.Entities.Entity __gen_ret; translator.Get(L, errFunc + 1, out __gen_ret); LuaAPI.lua_settop(L, errFunc - 1); return(__gen_ret); #if THREAD_SAFE || HOTFIX_ENABLE } #endif }
int UnityEngineQuaternion_m_Set(RealStatePtr L, int gen_param_count) { ObjectTranslator translator = this; UnityEngine.Quaternion gen_to_be_invoked; translator.Get(L, 1, out gen_to_be_invoked); { float _newX = (float)LuaAPI.lua_tonumber(L, 2); float _newY = (float)LuaAPI.lua_tonumber(L, 3); float _newZ = (float)LuaAPI.lua_tonumber(L, 4); float _newW = (float)LuaAPI.lua_tonumber(L, 5); gen_to_be_invoked.Set(_newX, _newY, _newZ, _newW); translator.UpdateUnityEngineQuaternion(L, 1, gen_to_be_invoked); return(0); } }
public UnityEngine.Vector3 __Gen_Delegate_Imp14(object p0, UnityEngine.Vector3 p1, UnityEngine.Vector3 p2) { #if THREAD_SAFE || HOTFIX_ENABLE lock (luaEnv.luaEnvLock) { #endif RealStatePtr L = luaEnv.rawL; int errFunc = LuaAPI.pcall_prepare(L, errorFuncRef, luaReference); ObjectTranslator translator = luaEnv.translator; translator.PushAny(L, p0); translator.PushUnityEngineVector3(L, p1); translator.PushUnityEngineVector3(L, p2); PCall(L, 3, 1, errFunc); UnityEngine.Vector3 __gen_ret;translator.Get(L, errFunc + 1, out __gen_ret); LuaAPI.lua_settop(L, errFunc - 1); return __gen_ret; #if THREAD_SAFE || HOTFIX_ENABLE } #endif }
int __CreateInstanceUnityEnginePlane(RealStatePtr L, int gen_param_count) { ObjectTranslator translator = this; if (gen_param_count == 3 && translator.Assignable <UnityEngine.Vector3>(L, 2) && translator.Assignable <UnityEngine.Vector3>(L, 3)) { UnityEngine.Vector3 _inNormal; translator.Get(L, 2, out _inNormal); UnityEngine.Vector3 _inPoint; translator.Get(L, 3, out _inPoint); UnityEngine.Plane gen_ret = new UnityEngine.Plane(_inNormal, _inPoint); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 3 && translator.Assignable <UnityEngine.Vector3>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) { UnityEngine.Vector3 _inNormal; translator.Get(L, 2, out _inNormal); float _d = (float)LuaAPI.lua_tonumber(L, 3); UnityEngine.Plane gen_ret = new UnityEngine.Plane(_inNormal, _d); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 4 && translator.Assignable <UnityEngine.Vector3>(L, 2) && translator.Assignable <UnityEngine.Vector3>(L, 3) && translator.Assignable <UnityEngine.Vector3>(L, 4)) { UnityEngine.Vector3 _a; translator.Get(L, 2, out _a); UnityEngine.Vector3 _b; translator.Get(L, 3, out _b); UnityEngine.Vector3 _c; translator.Get(L, 4, out _c); UnityEngine.Plane gen_ret = new UnityEngine.Plane(_a, _b, _c); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 1) { translator.Push(L, default(UnityEngine.Plane)); return(1); } return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Plane constructor!")); }
public static bool TryPrimitiveArraySet(Type type, RealStatePtr L, object obj, int array_idx, int obj_idx) { bool ok = true; LuaTypes lua_type = LuaAPI.lua_type(L, obj_idx); if (type == typeof(int[]) && lua_type == LuaTypes.LUA_TNUMBER) { int[] array = obj as int[]; array[array_idx] = LuaAPI.xlua_tointeger(L, obj_idx); } else if (type == typeof(float[]) && lua_type == LuaTypes.LUA_TNUMBER) { float[] array = obj as float[]; array[array_idx] = (float)LuaAPI.lua_tonumber(L, obj_idx); } else if (type == typeof(double[]) && lua_type == LuaTypes.LUA_TNUMBER) { double[] array = obj as double[]; array[array_idx] = LuaAPI.lua_tonumber(L, obj_idx);; } else if (type == typeof(bool[]) && lua_type == LuaTypes.LUA_TBOOLEAN) { bool[] array = obj as bool[]; array[array_idx] = LuaAPI.lua_toboolean(L, obj_idx); } else if (type == typeof(long[]) && LuaAPI.lua_isint64(L, obj_idx)) { long[] array = obj as long[]; array[array_idx] = LuaAPI.lua_toint64(L, obj_idx); } else if (type == typeof(ulong[]) && LuaAPI.lua_isuint64(L, obj_idx)) { ulong[] array = obj as ulong[]; array[array_idx] = LuaAPI.lua_touint64(L, obj_idx); } else if (type == typeof(sbyte[]) && lua_type == LuaTypes.LUA_TNUMBER) { sbyte[] array = obj as sbyte[]; array[array_idx] = (sbyte)LuaAPI.xlua_tointeger(L, obj_idx); } else if (type == typeof(short[]) && lua_type == LuaTypes.LUA_TNUMBER) { short[] array = obj as short[]; array[array_idx] = (short)LuaAPI.xlua_tointeger(L, obj_idx); } else if (type == typeof(ushort[]) && lua_type == LuaTypes.LUA_TNUMBER) { ushort[] array = obj as ushort[]; array[array_idx] = (ushort)LuaAPI.xlua_tointeger(L, obj_idx); } else if (type == typeof(char[]) && lua_type == LuaTypes.LUA_TNUMBER) { char[] array = obj as char[]; array[array_idx] = (char)LuaAPI.xlua_tointeger(L, obj_idx); } else if (type == typeof(uint[]) && lua_type == LuaTypes.LUA_TNUMBER) { uint[] array = obj as uint[]; array[array_idx] = LuaAPI.xlua_touint(L, obj_idx); } else if (type == typeof(IntPtr[]) && lua_type == LuaTypes.LUA_TLIGHTUSERDATA) { IntPtr[] array = obj as IntPtr[]; array[array_idx] = LuaAPI.lua_touserdata(L, obj_idx); } else if (type == typeof(decimal[])) { decimal[] array = obj as decimal[]; if (lua_type == LuaTypes.LUA_TNUMBER) { array[array_idx] = (decimal)LuaAPI.lua_tonumber(L, obj_idx); } if (lua_type == LuaTypes.LUA_TUSERDATA) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if (translator.IsDecimal(L, obj_idx)) { translator.Get(L, obj_idx, out array[array_idx]); } else { ok = false; } } else { ok = false; } } else if (type == typeof(string[]) && lua_type == LuaTypes.LUA_TSTRING) { string[] array = obj as string[]; array[array_idx] = LuaAPI.lua_tostring(L, obj_idx); } else { ok = false; } return(ok); }
internal static bool __tryArraySet(Type type, RealStatePtr L, ObjectTranslator translator, object obj, int array_idx, int obj_idx) { if (type == typeof(UnityEngine.Vector2[])) { UnityEngine.Vector2[] array = obj as UnityEngine.Vector2[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Vector3[])) { UnityEngine.Vector3[] array = obj as UnityEngine.Vector3[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Vector4[])) { UnityEngine.Vector4[] array = obj as UnityEngine.Vector4[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Color[])) { UnityEngine.Color[] array = obj as UnityEngine.Color[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Quaternion[])) { UnityEngine.Quaternion[] array = obj as UnityEngine.Quaternion[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Ray[])) { UnityEngine.Ray[] array = obj as UnityEngine.Ray[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Bounds[])) { UnityEngine.Bounds[] array = obj as UnityEngine.Bounds[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Ray2D[])) { UnityEngine.Ray2D[] array = obj as UnityEngine.Ray2D[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(Tutorial.TestEnum[])) { Tutorial.TestEnum[] array = obj as Tutorial.TestEnum[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(Tutorial.DerivedClass.TestEnumInner[])) { Tutorial.DerivedClass.TestEnumInner[] array = obj as Tutorial.DerivedClass.TestEnumInner[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } return(false); }
public LuaEnv() { if (LuaAPI.xlua_get_lib_version() != LIB_VERSION_EXPECT) { throw new InvalidProgramException("wrong lib version expect:" + LIB_VERSION_EXPECT + " but got:" + LuaAPI.xlua_get_lib_version()); } #if THREAD_SAFE || HOTFIX_ENABLE lock (luaEnvLock) { #endif LuaIndexes.LUA_REGISTRYINDEX = LuaAPI.xlua_get_registry_index(); #if GEN_CODE_MINIMIZE LuaAPI.xlua_set_csharp_wrapper_caller(InternalGlobals.CSharpWrapperCallerPtr); #endif // Create State rawL = LuaAPI.luaL_newstate(); //Init Base Libs LuaAPI.luaopen_xlua(rawL); LuaAPI.luaopen_i64lib(rawL); translator = new ObjectTranslator(this, rawL); translator.createFunctionMetatable(rawL); translator.OpenLib(rawL); ObjectTranslatorPool.Instance.Add(rawL, translator); LuaAPI.lua_atpanic(rawL, StaticLuaCallbacks.Panic); #if !XLUA_GENERAL LuaAPI.lua_pushstdcallcfunction(rawL, StaticLuaCallbacks.Print); if (0 != LuaAPI.xlua_setglobal(rawL, "print")) { throw new Exception("call xlua_setglobal fail!"); } #endif //template engine lib register TemplateEngine.LuaTemplate.OpenLib(rawL); AddSearcher(StaticLuaCallbacks.LoadBuiltinLib, 2); // just after the preload searcher AddSearcher(StaticLuaCallbacks.LoadFromCustomLoaders, 3); #if !XLUA_GENERAL AddSearcher(StaticLuaCallbacks.LoadFromResource, 4); AddSearcher(StaticLuaCallbacks.LoadFromStreamingAssetsPath, -1); #endif DoString(init_xlua, "Init"); init_xlua = null; #if !UNITY_SWITCH || UNITY_EDITOR AddBuildin("socket.core", StaticLuaCallbacks.LoadSocketCore); AddBuildin("socket", StaticLuaCallbacks.LoadSocketCore); #endif AddBuildin("CS", StaticLuaCallbacks.LoadCS); AddBuildin("crypt", LuaDLL.Lua.LoadCrypt); LuaAPI.lua_newtable(rawL); //metatable of indexs and newindexs functions LuaAPI.xlua_pushasciistring(rawL, "__index"); LuaAPI.lua_pushstdcallcfunction(rawL, StaticLuaCallbacks.MetaFuncIndex); LuaAPI.lua_rawset(rawL, -3); LuaAPI.xlua_pushasciistring(rawL, Utils.LuaIndexsFieldName); LuaAPI.lua_newtable(rawL); LuaAPI.lua_pushvalue(rawL, -3); LuaAPI.lua_setmetatable(rawL, -2); LuaAPI.lua_rawset(rawL, LuaIndexes.LUA_REGISTRYINDEX); LuaAPI.xlua_pushasciistring(rawL, Utils.LuaNewIndexsFieldName); LuaAPI.lua_newtable(rawL); LuaAPI.lua_pushvalue(rawL, -3); LuaAPI.lua_setmetatable(rawL, -2); LuaAPI.lua_rawset(rawL, LuaIndexes.LUA_REGISTRYINDEX); LuaAPI.xlua_pushasciistring(rawL, Utils.LuaClassIndexsFieldName); LuaAPI.lua_newtable(rawL); LuaAPI.lua_pushvalue(rawL, -3); LuaAPI.lua_setmetatable(rawL, -2); LuaAPI.lua_rawset(rawL, LuaIndexes.LUA_REGISTRYINDEX); LuaAPI.xlua_pushasciistring(rawL, Utils.LuaClassNewIndexsFieldName); LuaAPI.lua_newtable(rawL); LuaAPI.lua_pushvalue(rawL, -3); LuaAPI.lua_setmetatable(rawL, -2); LuaAPI.lua_rawset(rawL, LuaIndexes.LUA_REGISTRYINDEX); LuaAPI.lua_pop(rawL, 1); // pop metatable of indexs and newindexs functions LuaAPI.xlua_pushasciistring(rawL, MAIN_SHREAD); LuaAPI.lua_pushthread(rawL); LuaAPI.lua_rawset(rawL, LuaIndexes.LUA_REGISTRYINDEX); LuaAPI.xlua_pushasciistring(rawL, CSHARP_NAMESPACE); if (0 != LuaAPI.xlua_getglobal(rawL, "CS")) { throw new Exception("get CS fail!"); } LuaAPI.lua_rawset(rawL, LuaIndexes.LUA_REGISTRYINDEX); #if !XLUA_GENERAL && (!UNITY_WSA || UNITY_EDITOR) translator.Alias(typeof(Type), "System.MonoType"); #endif if (0 != LuaAPI.xlua_getglobal(rawL, "_G")) { throw new Exception("get _G fail!"); } translator.Get(rawL, -1, out _G); LuaAPI.lua_pop(rawL, 1); errorFuncRef = LuaAPI.get_error_func_ref(rawL); if (initers != null) { for (int i = 0; i < initers.Count; i++) { initers[i](this, translator); } } translator.CreateArrayMetatable(rawL); translator.CreateDelegateMetatable(rawL); translator.CreateEnumerablePairs(rawL); #if THREAD_SAFE || HOTFIX_ENABLE } #endif }
internal static bool __tryArraySet(Type type, RealStatePtr L, ObjectTranslator translator, object obj, int array_idx, int obj_idx) { if (type == typeof(UnityEngine.Vector2[])) { UnityEngine.Vector2[] array = obj as UnityEngine.Vector2[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Vector3[])) { UnityEngine.Vector3[] array = obj as UnityEngine.Vector3[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Vector4[])) { UnityEngine.Vector4[] array = obj as UnityEngine.Vector4[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Color[])) { UnityEngine.Color[] array = obj as UnityEngine.Color[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Quaternion[])) { UnityEngine.Quaternion[] array = obj as UnityEngine.Quaternion[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Ray[])) { UnityEngine.Ray[] array = obj as UnityEngine.Ray[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Bounds[])) { UnityEngine.Bounds[] array = obj as UnityEngine.Bounds[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Ray2D[])) { UnityEngine.Ray2D[] array = obj as UnityEngine.Ray2D[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(DotEngine.Asset.AssetLoaderPriority[])) { DotEngine.Asset.AssetLoaderPriority[] array = obj as DotEngine.Asset.AssetLoaderPriority[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(DotEngine.UI.UILayerLevel[])) { DotEngine.UI.UILayerLevel[] array = obj as DotEngine.UI.UILayerLevel[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.SystemLanguage[])) { UnityEngine.SystemLanguage[] array = obj as UnityEngine.SystemLanguage[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } return(false); }
public static int XLuaAccess(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Type type = null; object obj = null; if (LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TTABLE) { LuaTable tbl; translator.Get(L, 1, out tbl); type = tbl.Get <Type>("UnderlyingSystemType"); } else if (LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING) { string className = LuaAPI.lua_tostring(L, 1); type = translator.FindType(className); } else if (LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TUSERDATA) { obj = translator.SafeGetCSObj(L, 1); if (obj == null) { return(LuaAPI.luaL_error(L, "xlua.access, #1 parameter must a type/c# object/string")); } type = obj.GetType(); } if (type == null) { return(LuaAPI.luaL_error(L, "xlua.access, can not find c# type")); } string fieldName = LuaAPI.lua_tostring(L, 2); BindingFlags bindingFlags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static; if (LuaAPI.lua_gettop(L) > 2) // set { var field = type.GetField(fieldName, bindingFlags); if (field != null) { field.SetValue(obj, translator.GetObject(L, 3, field.FieldType)); return(0); } var prop = type.GetProperty(fieldName, bindingFlags); if (prop != null) { prop.SetValue(obj, translator.GetObject(L, 3, prop.PropertyType), null); return(0); } } else { var field = type.GetField(fieldName, bindingFlags); if (field != null) { translator.PushAny(L, field.GetValue(obj)); return(1); } var prop = type.GetProperty(fieldName, bindingFlags); if (prop != null) { translator.PushAny(L, prop.GetValue(obj, null)); return(1); } } return(LuaAPI.luaL_error(L, "xlua.access, no field " + fieldName)); } catch (Exception e) { return(LuaAPI.luaL_error(L, "c# exception in xlua.access: " + e)); } }
internal static bool __tryArraySet(Type type, RealStatePtr L, ObjectTranslator translator, object obj, int array_idx, int obj_idx) { if (type == typeof(UnityEngine.Vector2[])) { UnityEngine.Vector2[] array = obj as UnityEngine.Vector2[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Vector3[])) { UnityEngine.Vector3[] array = obj as UnityEngine.Vector3[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Vector4[])) { UnityEngine.Vector4[] array = obj as UnityEngine.Vector4[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Color[])) { UnityEngine.Color[] array = obj as UnityEngine.Color[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Quaternion[])) { UnityEngine.Quaternion[] array = obj as UnityEngine.Quaternion[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Ray[])) { UnityEngine.Ray[] array = obj as UnityEngine.Ray[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Bounds[])) { UnityEngine.Bounds[] array = obj as UnityEngine.Bounds[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Ray2D[])) { UnityEngine.Ray2D[] array = obj as UnityEngine.Ray2D[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(XLuaFramework.NetPackageType[])) { XLuaFramework.NetPackageType[] array = obj as XLuaFramework.NetPackageType[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityMMO.SceneInfoKey[])) { UnityMMO.SceneInfoKey[] array = obj as UnityMMO.SceneInfoKey[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityMMO.SceneObjectType[])) { UnityMMO.SceneObjectType[] array = obj as UnityMMO.SceneObjectType[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.TextAnchor[])) { UnityEngine.TextAnchor[] array = obj as UnityEngine.TextAnchor[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.TouchPhase[])) { UnityEngine.TouchPhase[] array = obj as UnityEngine.TouchPhase[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } return(false); }
internal static bool __tryArraySet(Type type, RealStatePtr L, ObjectTranslator translator, object obj, int array_idx, int obj_idx) { if (type == typeof(XLuaTest.Pedding[])) { XLuaTest.Pedding[] array = obj as XLuaTest.Pedding[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(XLuaTest.MyStruct[])) { XLuaTest.MyStruct[] array = obj as XLuaTest.MyStruct[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(PushAsTableStruct[])) { PushAsTableStruct[] array = obj as PushAsTableStruct[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Vector2[])) { UnityEngine.Vector2[] array = obj as UnityEngine.Vector2[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Vector3[])) { UnityEngine.Vector3[] array = obj as UnityEngine.Vector3[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Vector4[])) { UnityEngine.Vector4[] array = obj as UnityEngine.Vector4[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Color[])) { UnityEngine.Color[] array = obj as UnityEngine.Color[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Quaternion[])) { UnityEngine.Quaternion[] array = obj as UnityEngine.Quaternion[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Ray[])) { UnityEngine.Ray[] array = obj as UnityEngine.Ray[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Bounds[])) { UnityEngine.Bounds[] array = obj as UnityEngine.Bounds[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Ray2D[])) { UnityEngine.Ray2D[] array = obj as UnityEngine.Ray2D[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(XLuaTest.MyEnum[])) { XLuaTest.MyEnum[] array = obj as XLuaTest.MyEnum[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } return(false); }
internal static bool __tryArraySet(Type type, RealStatePtr L, ObjectTranslator translator, object obj, int array_idx, int obj_idx) { if (type == typeof(UnityEngine.Vector2[])) { UnityEngine.Vector2[] array = obj as UnityEngine.Vector2[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Vector3[])) { UnityEngine.Vector3[] array = obj as UnityEngine.Vector3[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Vector4[])) { UnityEngine.Vector4[] array = obj as UnityEngine.Vector4[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Color[])) { UnityEngine.Color[] array = obj as UnityEngine.Color[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Quaternion[])) { UnityEngine.Quaternion[] array = obj as UnityEngine.Quaternion[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Ray[])) { UnityEngine.Ray[] array = obj as UnityEngine.Ray[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Bounds[])) { UnityEngine.Bounds[] array = obj as UnityEngine.Bounds[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.Ray2D[])) { UnityEngine.Ray2D[] array = obj as UnityEngine.Ray2D[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(UnityEngine.TextAnchor[])) { UnityEngine.TextAnchor[] array = obj as UnityEngine.TextAnchor[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(VVMUI.Script.XLua.XLuaDataType[])) { VVMUI.Script.XLua.XLuaDataType[] array = obj as VVMUI.Script.XLua.XLuaDataType[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } else if (type == typeof(VVMUI.Script.XLua.XLuaCommandType[])) { VVMUI.Script.XLua.XLuaCommandType[] array = obj as VVMUI.Script.XLua.XLuaCommandType[]; translator.Get(L, obj_idx, out array[array_idx]); return(true); } return(false); }