The ecs stuff does not get loaded until they are required in lua
This commit is contained in:
@@ -14,8 +14,8 @@ namespace ecs::lua {
|
||||
};
|
||||
|
||||
template <typename T, typename... Constructor, typename... Args>
|
||||
void register_component(sol::state& lua, Args... args) {
|
||||
lua.new_usertype<T>(get_typename<T>(),
|
||||
void register_component(sol::state& lua, sol::table& table, Args... args) {
|
||||
table.new_usertype<T>(get_typename<T>(),
|
||||
"new", sol::factories([](Constructor... constructor) {
|
||||
return new T(constructor...);
|
||||
}), args...
|
||||
|
||||
Reference in New Issue
Block a user