feat(lua): adds support for FSetProperty in Lua scripting#883
Conversation
UE4SS
left a comment
There was a problem hiding this comment.
Can you clarify where SetLayout in FSetProperty came from ?
It wasn't there before obviously, and this PR doesn't seem to change UVTD to add it.
Was this method previously manually deleted from files before being pushed to the repo or something ?
assets/Default_UVTD_Configs/Config/valid_udt_names.json |
This PR only adds |
Because that is the return type so it wasn't dumped as a valid udt type prior. |
UVTD is quite confusing. I should get back to my refactor. |
75d7c38 to
7a244b2
Compare
|
Tested, changes look good to me. Should remember to also update Types.lua |
|
Could you make an issue for the TArray thing you mentioned? |
It appears that the issue involves a wider scope than just TArray, should probably be decided at a later time instead. |
An issue for the aspects we discussed about table with member vs not, etc. would still be helpful for tracking. |
Done |
2ae5db7 to
be13f64
Compare
Adds Lua bindings for `FSetProperty`, allowing access to Unreal Engine sets from Lua scripts. This includes: - Adding `FScriptSetLayout` to the list of valid UDT names. - Updating member variable layout templates for various engine versions to include `SetLayout` offset. - Adding Lua type definitions and functions for `TSet`. - Adding a pusher for `SetProperty` to the Lua state.
- Fix array-like table value extraction using insert_value(-2) - Add TSet userdata support in lua_to_memory for round-trip functionality - Fix stack management in for_each_in_table iteration - Resolve string and FName type conversion errors - Fixes array interpretation to use values (10,11,12) instead of indices (1,2,3) - Enables passing TSet properties as function parameters NOTE: For now, TSet support is being merged with the same outparam functionality as TArray. TMap will be updated to match the TArray functionality with a pragma to control using the legacy behavior.
be13f64 to
c93966a
Compare
Description
Adds Lua bindings for
FSetProperty, allowing access to Unreal Engine sets from Lua scripts.This includes:
FScriptSetLayoutto the list of valid UDT names in UVTD dumps.SetLayoutoffset.TSet.SetPropertyto the Lua state.Fixes # (issue) (if applicable)
Type of change
How has this been tested?
Tested via the following lua script. This test will only work on UE versions after the ConcurrencySet property was added (I believe sometime after 4.26), and would need to be modified for other versions.
TSetTest.zip
Checklist