mordentral / VRExpansionPlugin

A UE4-5 VR framework
https://www.vreue4.com
MIT License
553 stars 117 forks source link

UE 5.3 Build failed. #44

Closed elai950 closed 1 year ago

elai950 commented 1 year ago

I'm using UE 5.3 and for the C++ the IDE is Rider. I've added this 2 modules the .Build.cs :

PublicDependencyModuleNames.AddRange(new string[] { ""AdvancedSessions", "AdvancedSteamSessions" });

After that, I wanted to inherite my game instance instead of UGameInstance to UAdvancedFriendsGameInstance. Running build and I'm getting compile failed with this errors:

0>OnlinePurchaseInterface.h(158): Error C2039 : 'GetObjectW': is not a member of 'FJsonSerializerBase'
0>JsonSerializerMacros.h(366): Reference  : see declaration of 'FJsonSerializerBase'
0>OnlinePurchaseInterface.h(158): Error C3536 : 'It': cannot be used before it is initialized
0>OnlinePurchaseInterface.h(158): Error C2100 : illegal indirection
0>OnlinePurchaseInterface.h(186): Error C2039 : 'GetObjectW': is not a member of 'FJsonSerializerBase'
0>JsonSerializerMacros.h(366): Reference  : see declaration of 'FJsonSerializerBase'
0>OnlinePurchaseInterface.h(186): Error C3536 : 'It': cannot be used before it is initialized
0>OnlinePurchaseInterface.h(186): Error C2100 : illegal indirection
0>SocketSubsystem.h(321): Error C2039 : 'SetPortW': is not a member of 'FInternetAddr'
0>SocketSubsystem.h(23): Reference  : see declaration of 'FInternetAddr'

If I change back to UGameInstance the compile succeed.

mordentral commented 1 year ago

What platform are you building that for? Its complaining about engine source files.

elai950 commented 1 year ago

I'm developing in Windows 11 64 bit. But the target platform is just Windows, Nothing else.

Screenshot_45

mordentral commented 1 year ago

its when packaging or just when compiling your project for the editor?

I don't know, you seem to be missing an export somewhere.

elai950 commented 1 year ago

It's happenning while compiling the project in Rider IDE. I've only added in the header file : #include "AdvancedFriendsGameInstance.h" Maybe I need to add something else?

mordentral commented 1 year ago

Yeah well, im afraid I can't be of much help here, its having issues finding variable types in the header files that the game instance uses.

Try adding the referenced modules to your build.cs as well.

Both of the below are included in the advanced sessions module and are relevant to the warnings you are getting. OnlineSubsystem", "Sockets"

Might have something to do with AS including them in both its private and public modules, which looks like a typo. Generally the plugin isn't meant to be used with source projects.

mordentral commented 1 year ago

i'll remove them under private dependencies, it may be overriding the public inclusion. Not sure of how the engine handles that.

elai950 commented 1 year ago

Well, I've just found the problem. I have discord GameSDK also and for some reason there's a collision between them like you've said. It's very problematic to not been able to use the SteamSDK and also discord's. Not that I'm blame you or something.

If you have any advice that would be great! Meanwhile I'll try to find a solution.

Thank you very much!

By the way, Getting and storing the friends list is failing, any clue about that? I don't get any error message, from blueprints it's exiting in the fail flow. I'm starting the game in a standalone environment, I don't see the steam popup either

mordentral commented 1 year ago

It will always fail if there is no popup as that means steam didn't load. Something on the config end is incorrect.

elai950 commented 1 year ago

I think I've made progress with it because now when launching from standalone it's just crash with this:

Unhandled Exception: 0xc06d007f
KERNELBASE
UnrealEditor_SteamShared
UnrealEditor_SteamShared
UnrealEditor_SteamShared
UnrealEditor_SteamShared
UnrealEditor_OnlineSubsystemSteam
UnrealEditor_OnlineSubsystemSteam
UnrealEditor_OnlineSubsystemSteam
UnrealEditor_OnlineSubsystem
UnrealEditor_OnlineSubsystem
UnrealEditor_OnlineSubsystem
UnrealEditor_OnlineSubsystem
UnrealEditor_Core
UnrealEditor_Projects
UnrealEditor_Projects
UnrealEditor_Projects
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
kernel32
ntdll
elai950 commented 1 year ago

About that crash. I ended up with reinstalling the engine and that solved all the problems. Maybe something was corrupted there. Thanks for the help!