From 1cd31d14c95f9d52e30fbc611df5da4b46f048d9 Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 19 Nov 2021 15:33:48 +0800 Subject: *misc --- Runtime/Lua/LuaBind/LuaBindState.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Runtime/Lua/LuaBind/LuaBindState.h') diff --git a/Runtime/Lua/LuaBind/LuaBindState.h b/Runtime/Lua/LuaBind/LuaBindState.h index e8ac42d..680f6e2 100644 --- a/Runtime/Lua/LuaBind/LuaBindState.h +++ b/Runtime/Lua/LuaBind/LuaBindState.h @@ -104,6 +104,10 @@ namespace LuaBind bool HasField(int idx, int name, int type); bool HasKeys(int idx); + template + void PushLuaObject(const T& obj) { + obj.CastToLuaObject(*this); + } void PushLuaObject(const ILuaClass& lc); void PushTable(const INativeTable& tb); void PushNil(); -- cgit v1.1-26-g67d0