You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 29, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+3-8Lines changed: 3 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,8 +14,6 @@ About
14
14

15
15
Art created by [Alex](https://www.instagram.com/redheadalex1)
16
16
17
-
***WARNING!!!*** this is a **beta** version of the addon made for Godot v4.0-stable. Which means frequent recompiles may be required and compatibility is not guaranteed between updates.
18
-
19
17
This is a Godot addon that adds Lua API support via GDScript, C# or GDExtension. Importantly this is **NOT** meant to be a replacement for or alternative to GDScript. This addon provides no functionality to program your game out of the box. This addon allows you to create custom Modding API's in a sandboxed environment. You have control of what people can and can not do within that sandbox.
20
18
21
19
To use you can either [Compile from source](#compiling) or you can download one of the [release builds](#release-builds).
@@ -39,10 +37,9 @@ Features
39
37
- Push any Variant as a global.
40
38
- Call Lua functions from GDScript.
41
39
- Choose which libraries you want Lua to have access to.
42
-
- Custom LuaCallable type which allows you to get a Lua function as a Callable. See [wiki](https://luaapi.weaselgames.info/v2.0-beta/examples/lua_callable/).
43
40
- LuaError type which is used to report any errors this addon or Lua run into.
44
41
- LuaCoroutine type which creates a Lua thread. This is not a OS thread but a coroutine.
45
-
- Object passed as userdata. See [wiki](https://luaapi.weaselgames.info/v2.0-beta/examples/objects/).
42
+
- Object passed as userdata. See [wiki](https://luaapi.weaselgames.info/latest/examples/objects/).
46
43
- Objects can override most of the Lua metamethods. I.E. __index by defining a function with the same name.
47
44
- Callables passed as userdata, which allows you to push a Callable as a Lua function.
48
45
- Basic types are passed as userdata (currently: Vector2, Vector3, Color, Rect2, Plane) with a useful metatable. This means you can do things like:
@@ -72,9 +69,7 @@ Release Builds
72
69
73
70
TODO
74
71
-----
75
-
- Finish v2 documentation
76
72
- Workaround for lack of CallableCustoms in GDExtension
77
-
- More up to date todo list on the v2 [project](https://github.com/WeaselGames/godot_luaAPI/projects/1)
Copy file name to clipboardExpand all lines: doc_classes/LuaAPI.xml
+11-2Lines changed: 11 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,15 @@
64
64
Calls a function inside current Lua state. This can be either a exposed function or a function defined with with Lua. You may want to check if the function actually exists with [code]function_exists(LuaFunctionName)[/code]. This function supports 1 return value from lua. It will be returned as a variant and if Lua returns no value it will be null. If an error occurs while calling this function, a LuaError object will be returned.
65
65
</description>
66
66
</method>
67
+
<methodname="call_function_ref">
68
+
<returntype="Variant" />
69
+
<paramindex="0"name="Args"type="Array" />
70
+
<paramindex="1"name="LuaFunctionRef"type="int" />
71
+
<description>
72
+
This method is used to create a Callable when pulling a lua function from the stack. It is not intended to be called directly.
73
+
When returning a Callable, the function ref is bound to the Callable. You must only supply the arguments.
When set to true all methods will be allowed on Objects be default and lua_fields is treated as a blacklist. When set to false, lua_fields is treated as a whitelist.
0 commit comments