//this source code was auto-generated by tolua#, do not modify it
|
|
using System;
|
|
using LuaInterface;
|
|
|
|
public class OptimizerWrap
|
|
{
|
|
public static void Register(LuaState L)
|
|
{
|
|
L.BeginStaticLibs("Optimizer");
|
|
L.RegFunction("ChangeSceneObjState", ChangeSceneObjState);
|
|
L.RegFunction("ChangeLayer", ChangeLayer);
|
|
L.RegFunction("CopyOnPC", CopyOnPC);
|
|
L.RegFunction("CreateMatPropertyBlock", CreateMatPropertyBlock);
|
|
L.RegFunction("CreateMatPropertyBlocks", CreateMatPropertyBlocks);
|
|
L.RegFunction("SetShaderLodValue", SetShaderLodValue);
|
|
L.EndStaticLibs();
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int ChangeSceneObjState(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
ToLua.CheckArgsCount(L, 1);
|
|
bool arg0 = LuaDLL.luaL_checkboolean(L, 1);
|
|
Optimizer.ChangeSceneObjState(arg0);
|
|
return 0;
|
|
}
|
|
catch(Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int ChangeLayer(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
ToLua.CheckArgsCount(L, 2);
|
|
UnityEngine.Transform arg0 = (UnityEngine.Transform)ToLua.CheckUnityObject(L, 1, typeof(UnityEngine.Transform));
|
|
string arg1 = ToLua.CheckString(L, 2);
|
|
Optimizer.ChangeLayer(arg0, arg1);
|
|
return 0;
|
|
}
|
|
catch(Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int CopyOnPC(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
ToLua.CheckArgsCount(L, 1);
|
|
string arg0 = ToLua.CheckString(L, 1);
|
|
Optimizer.CopyOnPC(arg0);
|
|
return 0;
|
|
}
|
|
catch(Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int CreateMatPropertyBlock(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
ToLua.CheckArgsCount(L, 0);
|
|
UnityEngine.MaterialPropertyBlock o = Optimizer.CreateMatPropertyBlock();
|
|
ToLua.PushObject(L, o);
|
|
return 1;
|
|
}
|
|
catch(Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int CreateMatPropertyBlocks(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
ToLua.CheckArgsCount(L, 1);
|
|
int arg0 = (int)LuaDLL.luaL_checknumber(L, 1);
|
|
UnityEngine.MaterialPropertyBlock[] o = Optimizer.CreateMatPropertyBlocks(arg0);
|
|
ToLua.Push(L, o);
|
|
return 1;
|
|
}
|
|
catch(Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int SetShaderLodValue(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
ToLua.CheckArgsCount(L, 1);
|
|
int arg0 = (int)LuaDLL.luaL_checknumber(L, 1);
|
|
Optimizer.SetShaderLodValue(arg0);
|
|
return 0;
|
|
}
|
|
catch(Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
}
|
|
|