defold (official)
defold/extension-lua-preprocessor
A Lua preprocessor that hooks into the Lua builder plugin system in bob, the
Defold build tool. It strips or keeps code at build time based on
--#IF, --#ELSE and --#ENDIF blocks that test the RELEASE, DEBUG or
HEADLESS keywords.
No Lua API — content, shaders, build-time tooling or engine-side native code only.
- GitHub: defold/extension-lua-preprocessor — pinned to
1.2.0(released while Defold 1.12.0 was current)- Pick a release from defold/extension-lua-preprocessor releases and add its Source code (zip) URL (or a packaged
.zipasset, if the library ships one) togame.projectunder[project]dependencies, then Fetch Libraries in the Defold editor. - Use Defold 1.4.2 or higher.
- Wrap code in the conditional comment blocks.
- Write
--DEBUG_ASSERT(...)to include an assert only in debug builds.
- Pick a release from defold/extension-lua-preprocessor releases and add its Source code (zip) URL (or a packaged