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

Missing dependecies on structs #6

Open
Darkratos opened this issue Apr 10, 2022 · 11 comments
Open

Missing dependecies on structs #6

Darkratos opened this issue Apr 10, 2022 · 11 comments

Comments

@Darkratos
Copy link

Hey, another problem I noticed is that the code doesn't handle TArray's (and probably other template types) dependencies.
I'm doing a fix here (in the generate_fproperty function), but this is also something to look at in a future update.

@cursey
Copy link
Owner

cursey commented Apr 11, 2022

A real fix for this should be implemented in SdkGenny not in UE4Genny. I'll work on it soon. Thanks for reminding me about this.

@cursey
Copy link
Owner

cursey commented Apr 11, 2022

I've implemented a fix for this in SdkGenny (d3407ec46365645b40fc5cde27303660298fc586). I've also updated this projects version of SdkGenny to the latest.

@Darkratos
Copy link
Author

Alright, this fixed most of the issue, but functions that take a TArray as a parameter still need resolving.

@cursey
Copy link
Owner

cursey commented Apr 11, 2022

functions that take a TArray as a parameter still need resolving.

Can you give me an example of where this is failing? I've reviewed the relevant SdkGenny code and it should be handling function parameters that use generic types properly.

@Darkratos
Copy link
Author

Darkratos commented Apr 11, 2022

Sure:
class APlayerControler has this function:

void ClientUpdateMultipleLevelsStreamingStatus(TArray<FUpdateLevelStreamingLevelStatus>& LevelStatuses);

and FUpdateLevelStreamingLevelStatus isn't included.
Also, many enum which have scoped types throw an error on forward declarations.
And to top it off, the .cpp files need to also have a dependency on UClass, which is not included as well.
Edit: The UClass one seems to be random tho, I re-dumped the sdk here and it looks fine.

@cursey
Copy link
Owner

cursey commented Apr 11, 2022

void ClientUpdateMultipleLevelsStreamingStatus(TArray<FUpdateLevelStreamingLevelStatus>& LevelStatuses);

Ah, I see. Probably because the parameter is a reference. I can fix that soon.

Also, many enum which have scoped types throw an error on forward declarations.

Can you give an example?

@Darkratos
Copy link
Author

All forward declared enums.
The fix is to add the scope on the forward declaration.
Sadly I can't give you an exact example right now but it's always an ': uint8_t' missing.

@cursey
Copy link
Owner

cursey commented Apr 11, 2022

Enums being forward declared might be a regression actually (from when I improved the dependency system). There's no reason to not just #include them as far as I can tell.

@cursey
Copy link
Owner

cursey commented Apr 11, 2022

I think I've fixed both issues in cursey/sdkgenny@20442e0. I've also updated UE4Genny with these changes.

@Darkratos
Copy link
Author

Alright! I'm going to try it out now and I'll give you the feedback in a bit!

@Darkratos
Copy link
Author

Darkratos commented Apr 11, 2022

The project gets so large that it takes a long time to compile, but, as far as I've seen, the main problem is fixed.
The undefined UClass isn't quite fixed yet, but I should be able to just call the '->depends' on the generate_procedure to fix 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

2 participants