How to target EOS and Steam indepedently?

I’m trying to target my game for EOS and Steam without needing to comment out the DefaultEngine.ini lines.

I have looked at Lyra, and have updated my project so that I have an additional Target.cs

using UnrealBuildTool;

public class ProjectTest_EOSTarget : ProjectTestTarget
{
    public ProjectTest_EOSTarget (TargetInfo Target) : base(Target)
    {
	    CustomConfig = "EOS";
    }
}

And I have added in additional DefaultEngine.ini in the EOS folder:

| ProjectTest
– |Config
– | Custom
– | EOS

I have also built the Engine from source, and so I’m still stuck and would really appreciate some help.

I have tested this by adding the values from the EOS/DefaultEngine.ini into the Config/DefaultEngine.ini and the end result worked perfectly. However, when I place them exclusively into the EOS/DefaultEngine.ini, nothing works.

It may work only in packaged builds, as I’ve been using it exclusively in editor with Standalone. I’m currently unable to test as I am waiting on a new SSD with more storage and cannot package the project with the limited space I have.

Yeah, it only really works in packaged builds not in editor. Not even in standalone.

The rest of the setup works beautifully

To choose between EOS and Steam when running the Editor you need to use the CustomConfig parameter, like -customconfig=EOS, when starting the Editor.

For more info see Using Lyra With Epic Online Services in Unreal Engine | Unreal Engine 5.5 Documentation | Epic Developer Community

(If you want to start the Editor rather than the Game, ignore the -game parameter they suggest in that link, otherwise everything else works the same).