Skip to content

Commit

Permalink
fixed inline lua scripts instanced at runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
nem0 committed Jun 19, 2024
1 parent 2f52068 commit d04c545
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lua_script/lua_script_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2203,6 +2203,9 @@ struct LuaScriptModuleImpl final : LuaScriptModule
auto iter = m_inline_scripts.insert(entity, InlineScriptComponent(entity, *this, m_system.m_allocator));
serializer.read(iter.value().m_source);
m_world.onComponentCreated(entity, LUA_SCRIPT_INLINE_TYPE, this);
if (m_is_game_running) {
startScript(entity, iter.value(), false);
}
}
}

Expand Down

0 comments on commit d04c545

Please sign in to comment.