ResourceRequire
public void RegisterModule(NLua.Lua lua, Module<LuaModuleInterface> module)
Language: C#
Registers a module to be available for requiring in Lua scripts.
Parameters:
- lua: The Lua state to register the module with.
- module: The module to register.
public void UnregisterModule(NLua.Lua lua, Module<LuaModuleInterface> module)
Language: C#
Unregisters a module, removing it from the Lua require cache.
Parameters:
- lua: The Lua state to unregister the module from.
- module: The module to unregister.
public static string LoadEmbeddedResource(string name, params string[] paths)
Language: C#
Loads an embedded resource by searching through the provided paths.
Parameters:
- name: The name of the resource to load.
- paths: The paths to search for the resource.
Returns: The content of the embedded resource, or null if not found.
public string LoadEmbeddedResource(string name)
Language: C#
Loads an embedded resource by searching through the instance's paths.
Parameters:
- name: The name of the resource to load.
Returns: The content of the embedded resource, or null if not found.
public void Register(NLua.Lua lua)
Language: C#
Registers the custom require function in the given Lua state.
Parameters:
- lua: The Lua state to register the require function with.
public void Unregister(NLua.Lua lua)
Language: C#
Unregisters the custom require function from the given Lua state.
Parameters:
- lua: The Lua state to unregister the require function from.
public void ReloadModules(NLua.Lua lua)
Language: C#
Reloads all registered modules into the Lua require cache.
Parameters:
- lua: The Lua state to reload the modules into.