Skip to content

Instantly share code, notes, and snippets.

@Vbif
Vbif / hooks.editor_script
Created April 14, 2025 14:27
Write engine and editor versions to file on build
local M = {}
function M.on_build_started(opts)
local file = io.open("version.txt", "w")
file:write("version: " .. editor.version, "\n")
file:write("sha1: " .. editor.engine_sha1, "\n")
file:close()
end
return M
@Vbif
Vbif / file.cpp
Last active April 5, 2021 19:30
Defold - auto register enums
// test compile
typedef double lua_Number;
typedef struct {} lua_State;
void lua_pushnumber (lua_State *L, lua_Number n) {}
void lua_setfield (lua_State *L, int index, const char *k) {}
// test
#include <stdlib.h>
#include <string.h>