`LuaRecord.is_preview` and the `on_pre_build` event.
Posted: Thu Sep 11, 2025 9:39 pm
(In the #mod-dev-help discord channel, Bilka asked for a forum post to be made about this issue. Link to the original discord discussion: here)
We received the following multiplayer crash report:
Upon analysis, we found the crash is occurring in the `on_pre_build` event for a blueprint where `is_preview` is `true`.
Questions arose about the meaning of the `LuaRecord.is_preview` flag and how it could possibly be `true` for a blueprint that was actually being built. As `on_pre_build` is the "last chance" event (at least as far as I know) for mods to look at what entities a blueprint will build, it would be preferable if blueprint entities were fully readable at that point.
We received the following multiplayer crash report:
Upon analysis, we found the crash is occurring in the `on_pre_build` event for a blueprint where `is_preview` is `true`.
Questions arose about the meaning of the `LuaRecord.is_preview` flag and how it could possibly be `true` for a blueprint that was actually being built. As `on_pre_build` is the "last chance" event (at least as far as I know) for mods to look at what entities a blueprint will build, it would be preferable if blueprint entities were fully readable at that point.