Book Image

Unreal Engine 4 Scripting with C++ Cookbook

By : William Sherif, Stephen Whittle
Book Image

Unreal Engine 4 Scripting with C++ Cookbook

By: William Sherif, Stephen Whittle

Overview of this book

Unreal Engine 4 (UE4) is a complete suite of game development tools made by game developers, for game developers. With more than 100 practical recipes, this book is a guide showcasing techniques to use the power of C++ scripting while developing games with UE4. It will start with adding and editing C++ classes from within the Unreal Editor. It will delve into one of Unreal's primary strengths, the ability for designers to customize programmer-developed actors and components. It will help you understand the benefits of when and how to use C++ as the scripting tool. With a blend of task-oriented recipes, this book will provide actionable information about scripting games with UE4, and manipulating the game and the development environment using C++. Towards the end of the book, you will be empowered to become a top-notch developer with Unreal Engine 4 using C++ as the scripting language.
Table of Contents (19 chapters)
Unreal Engine 4 Scripting with C++ Cookbook
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Index

UE4 – first project


Setting up a Project within UE4 takes a number of steps. It is important to get your options correct so that you can have the setup that you like, so carefully follow this recipe when constructing your first project.

Each project that you create within UE4 takes up at least 1 GB of space or so, so you should decide whether you want your created projects on the same target drive, or on an external or separate HDD.

How to do it...

  1. From the Epic Games Launcher, click on the Launch Unreal Engine 4.11.2 button. Once you are inside the engine, an option to create a new project or load an existing one will presents itself.

  2. Select the New Project tab.

  3. Decide whether you will be using C++ to code your project, or Blueprints exclusively.

    1. If using Blueprints exclusively, make your selection of a template to use from the Blueprint tab.

    2. If using C++ in addition to Blueprints to construct your project, select the project template to construct your project based on the C++ tab.

    3. If you're not sure what template to base your code on, BASIC Code is an excellent starting point for any C++ project (or Blank for a Blueprint-exclusive project).

  4. Take a look at the three icons that appear beneath the template listing. There are three options here to configure:

    1. You can choose to target Desktop or Mobile applications.

    2. You have an option to alter the quality settings (the picture of a plant with magic). But you probably don't need to alter these. The quality settings are reconfigurable under Engine | Engine Scalability Settings anyway.

    3. The last option is whether to include Starter Content with the project or not. You can probably use the Starter Content package in your project. It has some excellent materials and textures available within it.

    Tip

    If you don't like the Starter Content package, try the packages in the UE4 Marketplace. There is some excellent free content there, including the GameTextures Material Pack.

  5. Select the drive and folder in which you will save your project. Keep in mind that each project is roughly 1 GB in size, and you will need at least that much space on the destination drive.

  6. Name your project. Preferably name it something unique and specific to what you are planning on creating.

  7. Hit Create. Both the UE4 Editor and Visual Studio 2015 windows should pop up, enabling you to edit your project.

    Tip

    In the future, keep in mind that you can open the Visual Studio 2015 Solution via one of the two following methods:

    • Via your local file explorer. Navigate to the root of where your project is stored, and double-click on the ProjectName.sln file.

    • From UE4, click on File | Open Visual Studio.