static int SetTexture(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 3 && TypeChecker.CheckTypes <string, UnityEngine.Texture>(L, 2))
            {
                Nova.RestorableMaterial obj = (Nova.RestorableMaterial)ToLua.CheckObject <Nova.RestorableMaterial>(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                UnityEngine.Texture arg1 = (UnityEngine.Texture)ToLua.ToObject(L, 3);
                obj.SetTexture(arg0, arg1);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes <int, UnityEngine.Texture>(L, 2))
            {
                Nova.RestorableMaterial obj = (Nova.RestorableMaterial)ToLua.CheckObject <Nova.RestorableMaterial>(L, 1);
                int arg0 = (int)LuaDLL.lua_tonumber(L, 2);
                UnityEngine.Texture arg1 = (UnityEngine.Texture)ToLua.ToObject(L, 3);
                obj.SetTexture(arg0, arg1);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes <string, UnityEngine.RenderTexture, UnityEngine.Rendering.RenderTextureSubElement>(L, 2))
            {
                Nova.RestorableMaterial obj = (Nova.RestorableMaterial)ToLua.CheckObject <Nova.RestorableMaterial>(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                UnityEngine.RenderTexture arg1 = (UnityEngine.RenderTexture)ToLua.ToObject(L, 3);
                UnityEngine.Rendering.RenderTextureSubElement arg2 = (UnityEngine.Rendering.RenderTextureSubElement)ToLua.ToObject(L, 4);
                obj.SetTexture(arg0, arg1, arg2);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes <int, UnityEngine.RenderTexture, UnityEngine.Rendering.RenderTextureSubElement>(L, 2))
            {
                Nova.RestorableMaterial obj = (Nova.RestorableMaterial)ToLua.CheckObject <Nova.RestorableMaterial>(L, 1);
                int arg0 = (int)LuaDLL.lua_tonumber(L, 2);
                UnityEngine.RenderTexture arg1 = (UnityEngine.RenderTexture)ToLua.ToObject(L, 3);
                UnityEngine.Rendering.RenderTextureSubElement arg2 = (UnityEngine.Rendering.RenderTextureSubElement)ToLua.ToObject(L, 4);
                obj.SetTexture(arg0, arg1, arg2);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: Nova.RestorableMaterial.SetTexture"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Beispiel #2
0
    static int SetGlobalTexture(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes <int, UnityEngine.Texture>(L, 1))
            {
                int arg0 = (int)LuaDLL.lua_tonumber(L, 1);
                UnityEngine.Texture arg1 = (UnityEngine.Texture)ToLua.ToObject(L, 2);
                UnityEngine.Shader.SetGlobalTexture(arg0, arg1);
                return(0);
            }
            else if (count == 2 && TypeChecker.CheckTypes <string, UnityEngine.Texture>(L, 1))
            {
                string arg0 = ToLua.ToString(L, 1);
                UnityEngine.Texture arg1 = (UnityEngine.Texture)ToLua.ToObject(L, 2);
                UnityEngine.Shader.SetGlobalTexture(arg0, arg1);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes <int, UnityEngine.RenderTexture, UnityEngine.Rendering.RenderTextureSubElement>(L, 1))
            {
                int arg0 = (int)LuaDLL.lua_tonumber(L, 1);
                UnityEngine.RenderTexture arg1 = (UnityEngine.RenderTexture)ToLua.ToObject(L, 2);
                UnityEngine.Rendering.RenderTextureSubElement arg2 = (UnityEngine.Rendering.RenderTextureSubElement)ToLua.ToObject(L, 3);
                UnityEngine.Shader.SetGlobalTexture(arg0, arg1, arg2);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes <string, UnityEngine.RenderTexture, UnityEngine.Rendering.RenderTextureSubElement>(L, 1))
            {
                string arg0 = ToLua.ToString(L, 1);
                UnityEngine.RenderTexture arg1 = (UnityEngine.RenderTexture)ToLua.ToObject(L, 2);
                UnityEngine.Rendering.RenderTextureSubElement arg2 = (UnityEngine.Rendering.RenderTextureSubElement)ToLua.ToObject(L, 3);
                UnityEngine.Shader.SetGlobalTexture(arg0, arg1, arg2);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Shader.SetGlobalTexture"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }