1.2 - Opening the Project in Visual Studio

Learn how to open your C++ project in Visual Studio.


When we setup our Basic Code project in the previous step, Unreal Engine created a Game Mode for us. Game Modes define a game's rules and win conditions. Our Game Mode also sets default classes that will be used for some basic gameplay framework types, including Pawn, PlayerController, and HUD. During this step, we're going to use the Editor to open our solution in Visual Studio so that we can view our project's Game Mode class.

  1. In the File menu, select Open Visual Studio to open your C++ code in Visual Studio.


  2. After Visual Studio opens up your C++ code, you should be able to see the CPP and header files inside of Visual Studio's Solution Explorer.


  3. By now, you should have the following code inside of FPSProjectGameMode.cpp.

    #include "FPSProject.h"
    #include "FPSProjectGameMode.h"
  4. Also, you should have the following code inside of FPSProjectGameMode.h.

    #pragma once
    #include "GameFramework/GameModeBase.h"
    #include "FPSProjectGameMode.generated.h"
    class FPSPROJECT_API AFPSProjectGameMode : public AGameModeBase
  5. Now that you've opened your C++ project in Visual Studio, you're ready to start adding code to the project.

Select Skin

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback