public static void Register(LuaEnv luaEnv) { Type type = luaEnv.GetType(); FieldInfo fieldInfo = type.GetField("rawL", BindingFlags.NonPublic | BindingFlags.Instance); RealStatePtr L = (RealStatePtr)fieldInfo.GetValue(luaEnv); LuaAPI.lua_newtable(L); LuaAPI.xlua_pushasciistring(L, "Property_GameObject"); LuaAPI.lua_pushnumber(L, (double)Contents.PropertyType.GameObject); LuaAPI.lua_rawset(L, -3); LuaAPI.xlua_pushasciistring(L, "Property_LuaComponet"); LuaAPI.lua_pushnumber(L, (double)Contents.PropertyType.LuaComponet); LuaAPI.lua_rawset(L, -3); LuaAPI.xlua_pushasciistring(L, "Property_Texture"); LuaAPI.lua_pushnumber(L, (double)Contents.PropertyType.Texture); LuaAPI.lua_rawset(L, -3); LuaAPI.xlua_pushasciistring(L, "Property_Material"); LuaAPI.lua_pushnumber(L, (double)Contents.PropertyType.Material); LuaAPI.lua_rawset(L, -3); LuaAPI.xlua_pushasciistring(L, "Property_Sprite"); LuaAPI.lua_pushnumber(L, (double)Contents.PropertyType.Sprite); LuaAPI.lua_rawset(L, -3); LuaAPI.xlua_pushasciistring(L, "Property_AudioClip"); LuaAPI.lua_pushnumber(L, (double)Contents.PropertyType.AudioClip); LuaAPI.lua_rawset(L, -3); LuaAPI.xlua_pushasciistring(L, "Property_TextAsset"); LuaAPI.lua_pushnumber(L, (double)Contents.PropertyType.TextAsset); LuaAPI.lua_rawset(L, -3); LuaAPI.xlua_pushasciistring(L, "Property_Shader"); LuaAPI.lua_pushnumber(L, (double)Contents.PropertyType.Shader); LuaAPI.lua_rawset(L, -3); LuaAPI.xlua_pushasciistring(L, "Property_Value"); LuaAPI.lua_pushnumber(L, (double)Contents.PropertyType.Value); LuaAPI.lua_rawset(L, -3); LuaAPI.xlua_pushasciistring(L, "Value_String"); LuaAPI.lua_pushnumber(L, (double)Contents.ValueType.String); LuaAPI.lua_rawset(L, -3); LuaAPI.xlua_pushasciistring(L, "Value_Number"); LuaAPI.lua_pushnumber(L, (double)Contents.ValueType.Number); LuaAPI.lua_rawset(L, -3); LuaAPI.xlua_pushasciistring(L, "Value_Vector3"); LuaAPI.lua_pushnumber(L, (double)Contents.ValueType.Vector3); LuaAPI.lua_rawset(L, -3); LuaAPI.xlua_pushasciistring(L, "Value_Vector2"); LuaAPI.lua_pushnumber(L, (double)Contents.ValueType.Vector2); LuaAPI.lua_rawset(L, -3); LuaAPI.xlua_pushasciistring(L, "Value_Color"); LuaAPI.lua_pushnumber(L, (double)Contents.ValueType.Color); LuaAPI.lua_rawset(L, -3); LuaAPI.xlua_pushasciistring(L, "Value_Boolean"); LuaAPI.lua_pushnumber(L, (double)Contents.ValueType.Boolean); LuaAPI.lua_rawset(L, -3); LuaAPI.xlua_pushasciistring(L, "Value_Vector4"); LuaAPI.lua_pushnumber(L, (double)Contents.ValueType.Vector4); LuaAPI.lua_rawset(L, -3); LuaAPI.xlua_pushasciistring(L, "SetContent"); LuaAPI.lua_pushstdcallcfunction(L, new LuaCSFunction(SetContent)); LuaAPI.lua_rawset(L, -3); LuaAPI.xlua_pushasciistring(L, "Label"); LuaAPI.lua_pushstdcallcfunction(L, new LuaCSFunction(Label)); LuaAPI.lua_rawset(L, -3); LuaAPI.xlua_pushasciistring(L, "ComponentParam"); LuaAPI.lua_pushstdcallcfunction(L, new LuaCSFunction(ComponentParam)); LuaAPI.lua_rawset(L, -3); LuaAPI.xlua_pushasciistring(L, "ReferenceParam"); LuaAPI.lua_pushstdcallcfunction(L, new LuaCSFunction(ReferenceParam)); LuaAPI.lua_rawset(L, -3); LuaAPI.xlua_pushasciistring(L, "ValueParam"); LuaAPI.lua_pushstdcallcfunction(L, new LuaCSFunction(ValueParam)); LuaAPI.lua_rawset(L, -3); LuaAPI.xlua_pushasciistring(L, "EnumParam"); LuaAPI.lua_pushstdcallcfunction(L, new LuaCSFunction(EnumParam)); LuaAPI.lua_rawset(L, -3); LuaAPI.xlua_pushasciistring(L, "ComponentParamList"); LuaAPI.lua_pushstdcallcfunction(L, new LuaCSFunction(ComponentParamList)); LuaAPI.lua_rawset(L, -3); LuaAPI.xlua_pushasciistring(L, "ReferenceParamList"); LuaAPI.lua_pushstdcallcfunction(L, new LuaCSFunction(ReferenceParamList)); LuaAPI.lua_rawset(L, -3); LuaAPI.xlua_pushasciistring(L, "ValueParamList"); LuaAPI.lua_pushstdcallcfunction(L, new LuaCSFunction(ValueParamList)); LuaAPI.lua_rawset(L, -3); LuaAPI.xlua_setglobal(L, "AutoParameter"); }