I already have experience with Steam platform but I’m confused with GOG and Epic Games. I thinks these platforms follows the same step-by-step as download the SDK, configure the product on the platform site and implement everything using C# on unity.
But the doubt is, Do we need to make three build now as we have three platforms? if not, whats the best way to do that as we already have the steam on the project and maybe we need to download more the GOG and the Epic (EOS) too…
That means that can I download all the SDK and for example, its possible to make something like if Platform.GOG / Platform.Steam / Platform.Epic make something?
Note that you may have to include using statements that reference these, and think about UI stuff, possibly. Also keep in mind that they may work differently. For example, Steam and GOG both support leaderboards and achievements, but for GOG you need to fetch some data first before you can add an achievement, and they have different handling with regards to async operations.
Thanks. I already implemented for GOG and EPIC. I don’t know if it was the best implementation but it worked.
I used the #if statement as you said, but for GOG and EPIC each one needs to handle the login for each user and only after that you can unlock the achievements for example and make other API calls.
Alternatively if you want to better isolate the code for purposes of debugging or if the code that will be handling the platform needs more than just minor differences:
public class PlatformManager
{
public abstract void SomeThing();
}
public class SteamManager : PlatformManager
{
public override void SomeThing()
{
// code
}
}
public static class PlatformManagerFactory
{
public static PlatformManager CreateInstance()
{
#if STEAM
return new SteamManager();
#endif
}
}
Yeah. I think this is the best way for each platform handling your own API Calls.
Maybe create some interfaces for each important feature like Achievements, Save system…
I have a similar issue and not really sure what would be the best approach.
Only releasing on Itch and Steam.
At the moment I’m trying to setup Steamworks, achievements etc and I have not worked with it before.
I’m thinking about doing different versions for the 2 platforms, so they would also have an unique save folder.
Mainly to make sure, that a possible progress a person made with the itch version would not affect the Steam version and trigger achievements there.
But maybe I’m just missing something more or less obvious and I’m not real sure what is the common approach for that.
(I came across this possible situation when starting a game on Epic which I had played on Steam before and my save was there. No achievements at Epic for it, not sure what would have happened vice versa…)
The save folder is related with your player settings > Company Name and Product Name.
The folder will be on appdata/LocalLow/Company Name/Product Name. You will not resolve your problem If you create another project for the other platforms.
I don’t know what you can make to resolve this problem as I didn’t care in my game.
Maybe you can add in your save_name the platform too. For example in Steam you can write Save_Game_Steam and on Epic Save_Game_Epic.
My current approach, which appears to be working, is to have a dedicated loading scene that is platform specific. So I have one Init_Steam scene, one Init_GOG scene, etc.
My build automation (I’m using SuperUnityBuild) supports having different scene lists per release type.
The init scenes set up whatever Steam/GOG/Epic/whatever specific stuff they need to handle, and define a pre-processor directive, so that I can do #if STEAM #elif GOG etc. code blocks for when I call achievements, leaderboards, etc.
As a former Asset Store publisher, some customers also act as if they own your life because they have spent $10 on your asset. When something doesn’t meet their expectations, some can be quite rude. It’s not worth the money.
does anyone have any solution for excluding specific platform files per platform?
For instance, I don’t want to include my steam_api dlls with my epic or gog builds. Is there any way to set this up without having to clean stuff up manually?
I developed my solution by CI/CD pipeline, git push steam, git push epic from there we handle the building with all the packages, and the deployment to where it needs to be uploaded, nothing to clean up.
Push (forget about it) → GitHub Actions Workflow in each repo (e.g., actions.yaml) → Builds (with necessary libs that are pulled from wherever) → Deploy