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
- Added function `GetPlayer` which is just a fast way to get player controlled Pawn (the majority of the time it will be the player character)
36
+
- Added functions: `GetEngine`, `GetGameInstance`, `GetGameViewportClient`, `GetGameModeBase`, `GetGameStateBase`,`GetPersistentLevel` and `GetWorldSettings`
37
+
- Added functions to get static objects: `GetKismetStringLibrary`, `GetKismetTextLibrary`
38
+
- Added function `GetActorFromHitResult` which extracts the hit actor from a `FHitResult` struct based on UE's version
39
+
- Added FName utility functions:
40
+
-`FindFName`: wrapper for `FName(Name, EFindName.FNAME_Find)`
41
+
-`AddFName`: wrapper for `FName(Name, EFindName.FNAME_Add)`
42
+
- Added [Lua Server Annotations](https://luals.github.io/wiki/annotations/) to all UEHelpers functions
43
+
29
44
### C++ API
30
45
Key binds created with `UE4SSProgram::register_keydown_event` end up being duplicated upon mod hot-reload.
31
46
To fix this, `CppUserModBase::register_keydown_event` has been introduced.
@@ -67,6 +82,14 @@ The following search filters now allow multiple values, with each value separate
67
82
68
83
The callback of `NotifyOnNewObject` can now optionally return `true` to unregister itself ([UE4SS #432](https://github.com/UE4SS-RE/RE-UE4SS/pull/432)) - Lyrth
- Reworked all UEHelpers functions to ensure that they always return an object which can be checked with the function `IsValid` for validation
88
+
- Reworked `UEHelpers.GetPlayerController` to return first valid player controller (It will now return a player controller even if it doesn't control a pawn at the time)
89
+
- Reworked `UEHelpers.GetWorld` function to use UWorld cache (UWorld usually never changes)
90
+
- Change `UEHelpers.GetWorldContextObject` function annotation to return `UObject`. (Any UObject with a GetWorld() function is a valid WorldContext)
91
+
- Removed duplicate function `UEHelpers.GetKismetMathLibrary`
Copy file name to clipboardExpand all lines: docs/guides/using-custom-lua-bindings.md
+15-1Lines changed: 15 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,8 +28,22 @@ When developing your Lua mods, the language server should automatically parse al
28
28
}
29
29
```
30
30
31
-
To get context sensitive information about the custom game types, you need to [annotate your code](https://emmylua.github.io/annotation.html). This is done by adding a comment above the function/class/object that you want to annotate.
31
+
### How to use your mod's directory as workspace
32
+
As alternative you can open just your mod's root directory as workspace.
33
+
In this case you need to add a `.luarc.json` with `"workspace.library"` entries containing a path to the "shared" folder and the "Scripts" directory of your mod.
To get context sensitive information about the custom game types, you need to [annotate your code](https://emmylua.github.io/annotation.html) ([alternative documentation](https://luals.github.io/wiki/annotations/)). This is done by adding a comment above the function/class/object that you want to annotate.
0 commit comments