Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Add new() constructor for RemoteObject/LocalObject or a Global Function that can create an invalid object #652

Open
igromanru opened this issue Sep 7, 2024 · 0 comments

Comments

@igromanru
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant