Page Info
Skill Level:
Engine Version:

1.2 - Opening the Project in Visual Studio

Choose your OS:

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.