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

Shortcut keys in Visual Studio


Shortcut keys really save you time when coding. Knowing shortcut keys offhand is always good.

Getting ready

There are a number of shortcut keys that will make coding and project navigation much faster and more efficient for you. In this recipe, we describe how to use some of the common shortcut keys that will really enhance your coding speed.

How to do it...

The following are some very useful keyboard shortcuts for you to try:

  1. Click on one page of the code, then click somewhere else, at least 10 lines of code away. Now press Ctrl + - [navigate backwards]. Navigation through different pages of source code (the last place you were at, and the place you are at now) is done by pressing Ctrl + - and Ctrl + Shift + - respectively.

    Tip

    Warping around in the text editor using Ctrl + -. The cursor will jump back to the last location it was in that is more than 10 lines of code away, even if the last location was in a separate file.

    Say, for example, you're editing code in one place, and you want to go back to the place you've just been (or go back to the section in the code you came from). Simply press Ctrl + -, and that will warp you back to the location in the code you were at last. To warp forward to the location you were at before you pressed Ctrl + -, press Ctrl + Shift + -. To warp back, the previous location should be more than 10 lines away, or in a different file. These correspond to the Forward and Back menu buttons in the toolbar:

    Tip

    The Back and Forward navigation buttons in the toolbar, which correspond to the Ctrl + - and Ctrl + Shift + - shortcuts respectively.

  2. Press Ctrl + W to highlight a single word.

  3. Press and hold Ctrl + Shift + right arrow (or left arrow) (not Shift + right arrow) just to move to the right and left of the cursor, selecting entire words.

  4. Press Ctrl + C to copy text, Ctrl + X to cut text, and Ctrl + V to paste text.

  5. Clipboard ring: The clipboard ring is a kind of a reference to the fact that Visual Studio maintains a stack of the last copy operations. By pressing Ctrl + C, you push the text that you are copying into an effective stack. Pressing Ctrl + C a second time on different text pushes that text into the Clipboard Stack. For example, in the following diagram, we pressed Ctrl + C on the word cyclic first, then Ctrl + C on the word paste afterwards.

    As you know, pressing Ctrl + V pastes the top item in the stack. Pressing Ctrl + Shift + V accesses a very long history of all the items ever copied in that session, that is, items underneath the top item in the stack. After you exhaust the list of items, the list wraps back to the top item in the stack. This is an odd feature, but you may find it useful occasionally.

  6. Ctrl + M, Ctrl + M collapses a code section.

How it works...

Keyboard shortcuts allow you to speed up work in the code editor by reducing the number of mouse reaches that you have to perform in a coding session.