Hi,
Sorry for the very long delay, we are running short on UGS developers these days and I’m not an expert, but I took a look at my own UGS installation and I was surprised to see that I still had the UnrealGameSyncLauncher.exe, but as you mentioned, the code was merged. So I compared the files and UnrealGameSyncLauncher.exe and UnrealGameSync.exe are the same:
[Image Removed]So to answer your second question, how to use UnrealGameSync.exe as a launcher, you just need to run it, everything should happen under the hood. I assume you did that and got into the error you are reporting. I debugged this a bit to understand how it should go. I encourage you to open D:\UE_5.6\Engine\Source\Programs\UnrealGameSync\UnrealGameSync.sln and run it in debug. Here my understanding:
- UnrealGameSync starts -> D:\UE_5.6\Engine\Source\Programs\UnrealGameSync\UnrealGameSync\Program.cs -> static void Main(string args)
- If you are running the ‘Release’ build -> D:\UE_5.6\Engine\Source\Programs\UnrealGameSync\UnrealGameSync\Program.cs -> ShouldRunAutoUpdate(string[] args) will have WITH_AUTOUPDATE set and the function will return true. If you are running a debug build, just hack this function to return true.
- This will call SyncAndRunLatest() from -> D:\UE_5.6\Engine\Source\Programs\UnrealGameSync\UnrealGameSync\Launcher.cs
- This ends up calling SyncAndRun()
- This deletes the content of %LOCALAPPDATA%\UnrealGameSync\Latest\
- This download and unzip the latest version into %LOCALAPPDATA%\UnrealGameSync\Latest\
- Spawn a child UnrealGameSync.exe under %LOCALAPPDATA%\UnrealGameSync\Latest\
So if it relaunch old version for you, I suspect it might be because it redownload the stable version and override the unstable version. You can verify this by debugging and stopping the debugger D:\UE_5.6\Engine\Source\Programs\UnrealGameSync\UnrealGameSync\Launcher.cs:337, where the new process is spawned. Just stop the debugger and go into %LOCALAPPDATA%\UnrealGameSync\Latest\, double click on UnrealGameSync.exe and check if you have the unstable version you expect. While debugging, you can also verify which version is downloaded/synched. Ensure this is the one you expect. To force a redownload, I hacked AutoUpdate.ini and SyncVersion.txt to point to the previous version (you can also check what is in there too).
That should get you started to diagnose the issue.
Also, looking at the code, I found suspicious things that are probably not related, I still need to understand how this works, but I’ll mention it here anyways:
In D:\UE_5.6\Engine\Source\Programs\UnrealGameSync\UnrealGameSync\Launcher.cs:53, the -unstable and -preview arguments are read, but they don’t seem to affect the version downloaded. I think ‘launcherSettings’ variable should be assigned after line 58...
// Read the settings
LauncherSettings launcherSettings = new LauncherSettings();
launcherSettings.Read();
launcherSettining.PreviewBuild |= preview;
In D:\UE_5.6\Engine\Source\Programs\UnrealGameSync\UnrealGameSync\Launcher.cs:62, the childArgs is created, but not used. I suspect it should be passed like this because the SyncAndRun will respawn with the arguments.
List<string> childArgs = args.Except(new[] { "-settings", "-updatecheck", "-noupdatecheck" }, StringComparer.OrdinalIgnoreCase).ToList();
await SyncAndRun(perforce, settings, childArgs, instanceMutex, logWriter, cancellationToken);
Regards,
Patrick