static StackObject *SetParams_11(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 5);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Int32 @y = ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.Int32 @x = ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            System.Int32 @height = ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 4);
            System.Int32 @width = ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 5);
            UnityEngine.Display instance_of_this_method = (UnityEngine.Display) typeof(UnityEngine.Display).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.SetParams(@width, @height, @x, @y);

            return(__ret);
        }
Esempio n. 2
0
        static int _m_SetParams(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                UnityEngine.Display gen_to_be_invoked = (UnityEngine.Display)translator.FastGetCSObj(L, 1);



                {
                    int _width  = LuaAPI.xlua_tointeger(L, 2);
                    int _height = LuaAPI.xlua_tointeger(L, 3);
                    int _x      = LuaAPI.xlua_tointeger(L, 4);
                    int _y      = LuaAPI.xlua_tointeger(L, 5);

                    gen_to_be_invoked.SetParams(_width, _height, _x, _y);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
        static int _m_SetParams(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UnityEngine.Display __cl_gen_to_be_invoked = (UnityEngine.Display)translator.FastGetCSObj(L, 1);


            try {
                {
                    int width  = LuaAPI.xlua_tointeger(L, 2);
                    int height = LuaAPI.xlua_tointeger(L, 3);
                    int x      = LuaAPI.xlua_tointeger(L, 4);
                    int y      = LuaAPI.xlua_tointeger(L, 5);

                    __cl_gen_to_be_invoked.SetParams(width, height, x, y);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Esempio n. 4
0
        static int _g_get_active(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                UnityEngine.Display gen_to_be_invoked = (UnityEngine.Display)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushboolean(L, gen_to_be_invoked.active);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(1);
        }
        static int _g_get_depthBuffer(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                UnityEngine.Display __cl_gen_to_be_invoked = (UnityEngine.Display)translator.FastGetCSObj(L, 1);
                translator.Push(L, __cl_gen_to_be_invoked.depthBuffer);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(1);
        }
        static int _g_get_renderingHeight(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                UnityEngine.Display __cl_gen_to_be_invoked = (UnityEngine.Display)translator.FastGetCSObj(L, 1);
                LuaAPI.xlua_pushinteger(L, __cl_gen_to_be_invoked.renderingHeight);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(1);
        }
        static StackObject *Activate_9(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Display instance_of_this_method = (UnityEngine.Display) typeof(UnityEngine.Display).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Activate();

            return(__ret);
        }
        static StackObject *get_depthBuffer_5(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Display instance_of_this_method = (UnityEngine.Display) typeof(UnityEngine.Display).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.depthBuffer;

            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
        static StackObject *get_renderingHeight_1(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Display instance_of_this_method = (UnityEngine.Display) typeof(UnityEngine.Display).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.renderingHeight;

            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value      = result_of_this_method;
            return(__ret + 1);
        }
        static StackObject *SetRenderingResolution_12(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 3);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Int32 @h = ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.Int32 @w = ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            UnityEngine.Display instance_of_this_method = (UnityEngine.Display) typeof(UnityEngine.Display).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.SetRenderingResolution(@w, @h);

            return(__ret);
        }
        static int _m_SetRenderingResolution(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UnityEngine.Display __cl_gen_to_be_invoked = (UnityEngine.Display)translator.FastGetCSObj(L, 1);


            try {
                {
                    int w = LuaAPI.xlua_tointeger(L, 2);
                    int h = LuaAPI.xlua_tointeger(L, 3);

                    __cl_gen_to_be_invoked.SetRenderingResolution(w, h);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Esempio n. 12
0
        static int _m_Activate(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                UnityEngine.Display gen_to_be_invoked = (UnityEngine.Display)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 1)
                {
                    gen_to_be_invoked.Activate(  );



                    return(0);
                }
                if (gen_param_count == 4 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4))
                {
                    int _width       = LuaAPI.xlua_tointeger(L, 2);
                    int _height      = LuaAPI.xlua_tointeger(L, 3);
                    int _refreshRate = LuaAPI.xlua_tointeger(L, 4);

                    gen_to_be_invoked.Activate(_width, _height, _refreshRate);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Display.Activate!"));
        }
Esempio n. 13
0
        public static void WriteUnitySpecs(Log log)
        {
            try
            {
                log.Write(
                    "Unity Application paths:" + Environment.NewLine +
                    "  Persistent data:  {0}" + Environment.NewLine +
                    "  Application Data: {1}" + Environment.NewLine +
                    "  Temp data:        {2}" + Environment.NewLine +
                    "  Streaming Assets: {3}",
                    UnityEngine.Application.persistentDataPath,
                    UnityEngine.Application.dataPath,
                    UnityEngine.Application.temporaryCachePath,
                    UnityEngine.Application.streamingAssetsPath);

                log.Write(
                    "Unity Screen info:" + Environment.NewLine +
                    "  Output size:        {0}x{1}" + Environment.NewLine +
                    "  Fullscreen:         {2}" + Environment.NewLine +
                    "  Screen Resolution:  {3}" + Environment.NewLine +
                    "  Screen Orientation: {4}" + Environment.NewLine +
                    "  Screen DPI:         {5}",
                    UnityEngine.Screen.width,
                    UnityEngine.Screen.height,
                    UnityEngine.Screen.fullScreen,
                    UnityEngine.Screen.currentResolution,
                    UnityEngine.Screen.orientation,
                    UnityEngine.Screen.dpi);

                log.Write("Unity Display info:");
                log.PushIndent();
                for (int i = 0; i < UnityEngine.Display.displays.Length; i++)
                {
                    UnityEngine.Display display = UnityEngine.Display.displays[i];
                    log.Write(
                        "Display #{0} {1}" + Environment.NewLine +
                        "  Native size:    {2}x{3}" + Environment.NewLine +
                        "  Rendering size: {4}x{5}",
                        i,
                        display == UnityEngine.Display.main ? "(main)" : "",
                        display.systemWidth,
                        display.systemHeight,
                        display.renderingWidth,
                        display.renderingHeight);
                }
                log.PopIndent();

                UnityEngine.AudioConfiguration audioConfig = UnityEngine.AudioSettings.GetConfiguration();
                log.Write(
                    "Unity Audio Device info:" + Environment.NewLine +
                    "  Driver Caps:        {0}" + Environment.NewLine +
                    "  Speaker Mode:       {1}" + Environment.NewLine +
                    "  Output Sample Rate: {2}" + Environment.NewLine +
                    "  DSP Buffer Size:    {3}" + Environment.NewLine +
                    "  # Real Voices:      {4}" + Environment.NewLine +
                    "  # Virtual  Voices:  {5}",
                    UnityEngine.AudioSettings.driverCapabilities,
                    UnityEngine.AudioSettings.speakerMode,
                    UnityEngine.AudioSettings.outputSampleRate,
                    audioConfig.dspBufferSize,
                    audioConfig.numRealVoices,
                    audioConfig.numVirtualVoices);
            }
            catch (Exception e)
            {
                log.WriteWarning("Error logging Unity specs: {0}", LogFormat.Exception(e));
            }
        }