Hello everyone, I’m relatively new to Unreal Engine, but the project i’m working on requires custom OnlineSubSystem.
I have found these articles in off. documentation:
Here is a list of questions I hvae got so far, and was unable to find answers for these:
How do you actually add modules/other code to VS solution? Through VS, Create files in project folder or do i missing something? If I add some C++ classes to the project using C++ Class Wizard or folders, I cannot see em in the physical folder…
Another question is modules, is there some more detailed information on creating these? I have searched really hard, but was unable to find anything worthy… Maybe I have used some wrong keywords?
Sure, I need some sort of OnlineSubsystem tutorial, I have found some forums where peopla was talking about Copy/Pasting OnlineSubsystemNull as it has the minimum code amount and great place to start with, but I was unable to find where from I can copy it.
There are some tutorials out there, but they are deprecated meanwhile.
I have found a really nice solution and i build all my plugins with that solution,
There are several types of plugins, eg. game plugin, engine plugin, …
You can use my plugin solution for everything without adjusting anything.
Rename everything that includes “BasePlugin” into what you need, e.g. “MyFunctions” (renaming files and code)
I have already created the Binaries, so you already could use this plugin. But when renaming, you have to rebuild the plugin.
How to use it:
Create a UE4 project. It doesnt matter what type it is (BP or C++). When the project is created, close it and go to the project folder (via Explorer) and create a subfolder named “Plugins”. Copy the plugin into that folder. Thats almost everything. To make the plugins folder visible into VS, open the UE4 project, under “File” click on "Refresh Visual Studio Project, then under “File”, click on “Open Visual Studio”. The plugin folder is now visible within VS.
It is a short explanation and this topic is quite complex. If you have any further questions, just ask it
One last thing: The good thing is, that you can put this plugin in any project you want. Even into the Engine Plugins folder. It just works So when it comes to extending things with code, this is probably the best solution. I didnt invent this solution, i have found it out, that Epic Games use this Plugin Structure and i saw its advantages.
OnlieSubsystem is probably most undocumented feature in UE4, documentation lacks even on just using it. Only way to learn is to look how other OnlieSubsystem is build:
Most advanced once are Steam, Google Play and iOS, if you want something simpler for start Facebook is good one as it only implements profile and friend list. You will also find Null code too that you been asking for. Also look on API refrence, simply you need to create classes out of interface classes and override right functions, so UE4 can use online service using this common interface:
OnlineSubsystem also don’t user reflection system, you will need to manually register your OnlineSubsystem on module startup, here is how Steam is doing it:
As raidfire.net said good place for stuff liek that is plugins, but if you not planing to redistribute or reuse that code you can implement OnlineSubsystem in project module too, it rtechnicly it does not matter when you code it.