So, as the title would suggest, how do we go about correctly using the url in seamless travel? The documentation is of incredibly little help with this, is there a specific order parameters need to be passed in to the string? How do we go about extracting data from it once the travel has finished?
For the URL Seamless travel is the same as a regular travel. So if you set something on the URL, you get it once the travel is done.
You have some static function like UGameplayStatics::HasOption, UGameplayStatics::GetIntOption and so one that you can use in your GameMode InitGame to retrieve your value.
For string options you can also use UGameplayStatics::ParseOption as well. Each options is prefixed by
?##=
- where ## represents whatever you want to call the option (each has to be unique, and can be longer than two symbols but you wanna keep it short for less string comparisons
FString also supports the + operator, so you can do things like this:
const FString Options1 = TEXT("SomeOptionValue");
const FString Options2 = TEXT("OptionsValue2");
const FString URL = TEXT("?O1=") + Options1 + TEXT("?O2=") + Options2;
1 Like