Skip to content

0.8.0

Choose a tag to compare

@gilzoide gilzoide released this 30 Mar 00:36
· 54 commits to main since this release

Added

  • LuaState GC-related methods: collect_garbage, step_gc, stop_gc, restart_gc, is_gc_running, get_memory_used, change_gc_mode_incremental, change_gc_mode_generational, supports_gc_mode
  • Support for to-be-closed Variant variables in Lua 5.4+ (not supported in LuaJIT).
    Example:
    do
      local file<close> = FileAccess:open(...)
      -- `file` is automatically freed at the end of the scope,
      -- closing the opened file without waiting for garbage collection
    end

Fixed

  • LuaScripts have their _init method called when instantiated from scene
  • Calls to Variant.duplicate now correctly trigger methods in objects that support it, fixing calls to Node.duplicate and Resource.duplicate for example
  • Node metadata set in the inspector is now correctly set as metadata instead of regular raw data
  • Force a full garbage collection on LuaScriptLanguage's state to make sure all Variants are collected, releasing cyclic references from LuaScriptInstance/LuaScript to the LuaState itself.
  • Make sure owner Objects inherit from the class extended by Lua scripts.
    E.g.: attaching a Lua script that extends RefCounted to Node objects now gives an error
  • Support for loading LuaScripts using valid uid:// paths in builds

Changed

  • Godot 4.5 is now the minimum version necessary to use this addon
  • Updated godot-cpp to 10.0.0-rc1 using api_version=4.6
  • LuaScriptInstance's owner object is passed as self to methods instead of the data table.
  • LuaScriptInstance now uses a Dictionary for storing data instead of a Lua table.