Closed Scylin232 closed 1 year ago
/** Macro to handle the boilerplate of accessing the proper online subsystem and getting the requested interface */
#define IMPLEMENT_GET_INTERFACE(InterfaceType) \
static IOnline##InterfaceType##Ptr Get##InterfaceType##Interface(const FName SubsystemName = NAME_None) \
{ \
IOnlineSubsystem* OSS = IOnlineSubsystem::Get(SubsystemName); \
return (OSS == NULL) ? NULL : OSS->Get##InterfaceType##Interface(); \
} \
That macro has a default parameter of NAME_None, it should compile just fine as is. Are you trying to use the BP nodes IN c++?
Edit Ah actually I see what you mean, its using the macro as the template parameter now.
I did check through the source though and it has been this way since 4.27, and I am testing on a 5.2.1 binary engine version and its working fine for me?
Can't just pass in a subsystem name as we don't know it (would have to have the users pass it in with every request or iterate a list to set a default).
Alternative accessor is the direct: OnlineSub = Online::GetSubsystem(InWorld, NAME_None);
Pathway, however this method has been working for many many engine versions so far and hasn't recently changed so it should still be fine?
I honestly don't know why, but when I added '#include "Online.h"' to each of the files (cpp files, not headers), everything worked, I literally just checked it. It looks like the linker didn't work well in my environment. I'm pretty sure my engine is not modified since I reinstalled it before writing this post. Maybe someone else has this problem? Should I create a Pull Request with corrections or is it a vestige? Thanks a lot for your answer!
Mmm, yeah specifying online.h may do it, compilers and UE are very fiddly.
If you want to pull request it as a fix so you can have submission credits on the plugin feel free ;p
Otherwise i'll make the same change this weekend.
I want to make sure the include doesn't break anything in production, because sometimes rewriting imports can make things not work correctly. If you are sure that everything will be fine, then yes, I will create a pull-request right away, if you don't mind my testing - then please wait, just one day :) Thanks for your answers again!
Hello! I made sure that everything works as it should, on the build in development / in shipping the behavior is correct, I created a pull request, you can find it here: #74
Merged, thank you.
Helps to have the one with the compilation issues do it in the first place as I don't have to assume I caught it all.
You're welcome! I am pleased to help this project, because thanks to it, a very large part of the games in Steam and not only work in principle. Even despite such minor changes. Thank you for the project again!
Hello, firstly, I really appreciate your efforts, keeping such a complex project solo for 8 years is 👏
I have a problem adding a plugin to my project. My project version is 5.2, downloaded the plugin version from the website also under 5.2 (Although the .uplugin file says 5.1, I think it should be). My project doesn't want to compile (I'm using C++), the compilation error indicates a violation of the number of parameters on the engine's internal online system. I've tried: Regenerate files, Plugin Downgrade, Try to run only binaries without compiling. Seems like local error, but i can't understand why this happens.
Code of my examinations: