Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Unreal Engine 4.x Scripting with C++ Cookbook

You're reading from   Unreal Engine 4.x Scripting with C++ Cookbook Develop quality game components and solve scripting problems with the power of C++ and UE4

Arrow left icon
Product type Paperback
Published in Mar 2019
Publisher
ISBN-13 9781789809503
Length 708 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Authors (3):
Arrow left icon
John P. Doran John P. Doran
Author Profile Icon John P. Doran
John P. Doran
Stephen Whittle Stephen Whittle
Author Profile Icon Stephen Whittle
Stephen Whittle
William Sherif William Sherif
Author Profile Icon William Sherif
William Sherif
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. UE4 Development Tools FREE CHAPTER 2. Creating Classes 3. Memory Management, Smart Pointers, and Debugging 4. Actors and Components 5. Handling Events and Delegates 6. Input and Collision 7. Communication Between Classes and Interfaces: Part I 8. Communication Between Classes and Interfaces: Part II 9. Integrating C++ and the Unreal Editor: Part I 10. Integrating C++ and the Unreal Editor: Part II 11. Working with UE4 APIs 12. Multiplayer Networking in UE4 13. AI for Controlling NPCs 14. User Interfaces - UI and UMG 15. Other Books You May Enjoy

Creating your first project in UE4

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.21.2 button on the left side of the screen. Once you are inside the engine, an option to create a new project or load an existing one will present itself.
Note that depending on when you are reading this book, the version number could be different, but the steps should be the same, if not incredibly similar.
  1. Select the New Project tab.
  2. Decide whether you will be using C++ to code your project, or blueprints exclusively:
  • If you're using blueprints exclusively, make your selection of a template to use from the Blueprint tab.
  • If you're using C++ in addition to blueprints to construct your project, select the project template to construct your project based on the C++ tab.
  • 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 (Unreal's built-in visual scripting language) project):

For the purpose of this book, we will always be using a C++ project:

  1. Take a look at the three icons that appear beneath the template listing. There are three options here to configure:
  • You can choose to target desktop or mobile applications.
  • You have an option to alter the quality settings (the picture of a plant with the sun above it), but you probably don't need to alter these. The quality settings are reconfigurable under Engine | Engine Scalability Settings anyway.
  • 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 that are invaluable for a beginner, but as you start creating your own advanced projects, you will likely no longer need it.

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.
  1. 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.
  2. Name your project. Preferably, name it something unique and specific to what you are planning on creating.
  3. Hit Create. Both the UE4 Editor and Visual Studio 2017 windows should pop up, enabling you to edit your project.
In the future, keep in mind that you can open the Visual Studio 2017 Solution using one of two methods. The first is using your local file explorer. Navigate to the root of where your project is stored and double-click on the ProjectName.sln file. The second way is from UE4: click on File | Open Visual Studio.
You have been reading a chapter from
Unreal Engine 4.x Scripting with C++ Cookbook - Second Edition
Published in: Mar 2019
Publisher:
ISBN-13: 9781789809503
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime