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
UE4SS is currently set up in such a way that it uses weak pointer objects everywhere aka. RemoteObject/LocalObject which are objects that always exist but have an IsValid function to check if the pointer that points to the object is valid or simply a placeholder that always returns false.
It would be good to give Lua Mod developers a way to develop their mods with the same approach in mind that each object isn't nil and can be checked with IsValid.
Therefore I suggest to a typical :new() method for RemoteObject/LocalObject that can be used by Lua mod devs to create new empty/invalid objects instead of dealing with nil values in their own code.
If it's easier it can also be just a global function like CreateEmptyObject, CreateRemoteObject, CreateInvalidObject or whatever you want to call it.
The text was updated successfully, but these errors were encountered:
UE4SS is currently set up in such a way that it uses weak pointer objects everywhere aka. RemoteObject/LocalObject which are objects that always exist but have an
IsValid
function to check if the pointer that points to the object is valid or simply a placeholder that always returns false.It would be good to give Lua Mod developers a way to develop their mods with the same approach in mind that each object isn't nil and can be checked with
IsValid
.Therefore I suggest to a typical
:new()
method for RemoteObject/LocalObject that can be used by Lua mod devs to create new empty/invalid objects instead of dealing withnil
values in their own code.If it's easier it can also be just a global function like
CreateEmptyObject
,CreateRemoteObject
,CreateInvalidObject
or whatever you want to call it.The text was updated successfully, but these errors were encountered: