//this source code was auto-generated by tolua#, do not modify it
|
|
using System;
|
|
using LuaInterface;
|
|
|
|
public class UnityEngine_ScreenCaptureWrap
|
|
{
|
|
public static void Register(LuaState L)
|
|
{
|
|
L.BeginStaticLibs("ScreenCapture");
|
|
L.RegFunction("CaptureScreenshot", CaptureScreenshot);
|
|
L.RegFunction("CaptureScreenshotAsTexture", CaptureScreenshotAsTexture);
|
|
L.EndStaticLibs();
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int CaptureScreenshot(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
int count = LuaDLL.lua_gettop(L);
|
|
|
|
if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(string)))
|
|
{
|
|
string arg0 = ToLua.ToString(L, 1);
|
|
UnityEngine.ScreenCapture.CaptureScreenshot(arg0);
|
|
return 0;
|
|
}
|
|
else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(int)))
|
|
{
|
|
string arg0 = ToLua.ToString(L, 1);
|
|
int arg1 = (int)LuaDLL.lua_tonumber(L, 2);
|
|
UnityEngine.ScreenCapture.CaptureScreenshot(arg0, arg1);
|
|
return 0;
|
|
}
|
|
else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(UnityEngine.ScreenCapture.StereoScreenCaptureMode)))
|
|
{
|
|
string arg0 = ToLua.ToString(L, 1);
|
|
UnityEngine.ScreenCapture.StereoScreenCaptureMode arg1 = (UnityEngine.ScreenCapture.StereoScreenCaptureMode)ToLua.ToObject(L, 2);
|
|
UnityEngine.ScreenCapture.CaptureScreenshot(arg0, arg1);
|
|
return 0;
|
|
}
|
|
else
|
|
{
|
|
return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.ScreenCapture.CaptureScreenshot");
|
|
}
|
|
}
|
|
catch(Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int CaptureScreenshotAsTexture(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
int count = LuaDLL.lua_gettop(L);
|
|
|
|
if (count == 0)
|
|
{
|
|
UnityEngine.Texture2D o = UnityEngine.ScreenCapture.CaptureScreenshotAsTexture();
|
|
ToLua.Push(L, o);
|
|
return 1;
|
|
}
|
|
else if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(int)))
|
|
{
|
|
int arg0 = (int)LuaDLL.lua_tonumber(L, 1);
|
|
UnityEngine.Texture2D o = UnityEngine.ScreenCapture.CaptureScreenshotAsTexture(arg0);
|
|
ToLua.Push(L, o);
|
|
return 1;
|
|
}
|
|
else if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.ScreenCapture.StereoScreenCaptureMode)))
|
|
{
|
|
UnityEngine.ScreenCapture.StereoScreenCaptureMode arg0 = (UnityEngine.ScreenCapture.StereoScreenCaptureMode)ToLua.ToObject(L, 1);
|
|
UnityEngine.Texture2D o = UnityEngine.ScreenCapture.CaptureScreenshotAsTexture(arg0);
|
|
ToLua.Push(L, o);
|
|
return 1;
|
|
}
|
|
else
|
|
{
|
|
return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.ScreenCapture.CaptureScreenshotAsTexture");
|
|
}
|
|
}
|
|
catch(Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
}
|
|
|