[Bug] getDefaultPawnClass cause compile error

I found this while I try to do respawn, if in a GameMode blueprint, you use getDefaultPawnClass function to feed into SpawnActorByClass it will work the first time you do it in Editor.

However, if you then save everything(all compile dirty is cleared), close editor and then reopen the project, there will be compile error and then disconnect whatever output on the SpawnActorByClass node.

I think this should be consider a bug because in a GameMode BP, this should be the intended behavior so people can just set their GameMode default to say versioned up Pawn instead of have to use drop down menu to select it.( as it might be from testPawn->protoTypePawn->alphaPawn…etc. )

If I’m using this wrong, please answer with proper way to do it.

Hello,

Thank you for your report. We were not able to investigate this on the engine version you reported, but there have been many version changes to UE4 since this question was first posted. With a new version of the Engine comes new fixes and it is possible that this issue has changed or may no longer occur. Due to timetable of when this issue was first posted, we are marking this post as resolved for tracking purposes.

If you are still experiencing the issue you reported in the current engine version, then please respond to this message with additional information and we will investigate as soon as possible. If you are experiencing a similar, but different issue at this time, please submit a new report for it.

Thank you.