Error when opening copy of 5.0 to 5.1 project.

OcclusionAwarePlayerController is not an engine file as far as I know. Must be somewhere in your project or in a plugin. The first picture looks OK ( it starts with pragma once, then lastly it includes the .generated file for itself (same name as header + .generated)). The second pic does both wrong (pragma once is not first, it seems to include either itself (don’t do that) or it includes the wrong .generated file (for another header)). You should fix the includes on the second pic.