UObject: __index - UE4SS/UE4SS Wiki

The __index method in the UObject class attempts to return either a member variable or a callable UFunction.

You can use the 'type()' function on the returned value to figure out what Lua class it's using (if non-trivial type).

Return Value

# Type Information
1 UObject, UStruct, TArray

Example

Retrieves the value of 'MaxParticleResize' in the first instance of class 'UEngine' from memory.

local Engine = FindFirstOf("Engine")
local MaxParticleResize = Engine.MaxParticleResize
print(string.format("MaxParticleResizeis %d", MaxParticleResize))