About the use of multiple online subsystems

I’ve been using the Steam OSS and everything seems to be working fine. I now was willing to also add Facebook integration.

Is it possible to use the Steam OSS together with the Facebook OSS?

Currently I have this setup at my project DefaultEngine.ini:


[OnlineSubsystem]
DefaultPlatformService=Steam  

[OnlineSubsystemSteam]
bEnabled=true
...

What’s the point of the DefaultPlatformService? Can I use facebook with Steam set as the DefaultPlatformService?

If you guys happen to have any documentation that could help, I’d happily accept :wink:

Thanks!

Answering my own thread.

Yes, you can use multiple online subsystems by referencing them by name like:


IOnlineSubsystem::Get(TEXT("Facebook"));

Thanks.

Hi, I know this is kinda far away now, but I hope you’re still active/knowledgeable on this issue. I’m trying to switch OSS’ at runtime and having a lot of trouble. I see you’ve posted this example code for how to do it, but I’m foggy on where/when/how to implement this code to get the desired effect. Can you elaborate a bit more on how exactly you’re using this? Like is this put in some config file to have multiple OSS’ enabled by default, is this put before some function call somewhere at runtime, is it something totally different?

Thanks.

I want to know how to switch at runtime too, preferably via blueprint but C++ if necessary.

Would you mind explaining how you did that? I’m really new to this kind of stuff and it would be awesome if you could help me out! I would really owe you one.

1 Like

I think using few OnlineSubsystems is possible but with some restrictions.
For use:

  • Add subsystems to Config/DefaultEngine.ini, like this
[OnlineSubsystemSteam]
bEnabled=true
; other options

[OnlineSubsystemOculus]
bEnabled=true
; other options
  • In c++ call:
if (auto Subsystem = IOnlineSubsystem::Get()) { ... } // you will get system with tag [DefaultPlatformService] from DefaultEngine.ini
  • Or call this, for specified platform:
if (auto Subsystem = IOnlineSubsystem::Get(TEXT("Steam"))) { ... } // you will get Steam

But its working “right now, right here”. Get some data, or send or idk.
For example i tell about my case, where its doesnt working.
So i have EOS, for network sessions. But i also want local sessions, without login.
If i just call StartSession(…) in EOS - i have a crush, coz i don’t have UniqNetID (not loginned).
In OnlineSubsystemNull - i dont need UniqNetID and local session is working.
I tried to call StartSession(…) from OnlineSubsystemNull (with DefaultPlatformService=EOS), but its gives me strange behaviour. Like close map instantly after session created.

same exact objective same exact problem still working on a hack of a solution …