Skip to content
Snippets Groups Projects
Commit 8addbceb authored by Malte Christian Kögel's avatar Malte Christian Kögel
Browse files

log dummy data for independent variables to avoid size mismatch, as described in #97

parent 9df7956a
No related branches found
No related tags found
No related merge requests found
......@@ -146,16 +146,16 @@ void USFGameInstance::OnWorldStart()
void USFGameInstance::RestoreLastParticipantForDebugStart(USFCondition* InStartCondition)
{
bInDebugMode = true;
const int ParticipantSequenceNumber = USFParticipant::GetLastParticipantSequenceNumber();
const FString ParticipantID = USFParticipant::GetLastParticipantID();
Participant = NewObject<USFParticipant>(this,
FName(TEXT("Participant_") + ParticipantID));
StudySetup = USFParticipant::GetLastParticipantSetup();
Participant->Initialize(ParticipantSequenceNumber, ParticipantID);
Participant->LoadConditionsFromJson();
bInDebugMode = true;
Participant->SetIndependentVariablesFromStudySetup(StudySetup);
InitFadeHandler(StudySetup->FadeConfig);
......
......@@ -600,7 +600,10 @@ void USFParticipant::SetIndependentVariablesFromStudySetup(ASFStudySetup* Setup)
IndependentVariablesValues.Empty();
for (auto Var : Setup->IndependentVariables) {
FString Value = "";
if (Var->bAskedAtBeginning) {
if (USFGameInstance::Get()->IsInDebugMode()) {
Value = "DebugRun-NoData";
}
else if (Var->bAskedAtBeginning) {
switch (Var->ValueType) {
case EValType::TEXT:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment