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

Using the Profiler to identify hot spots


The C++ Profiler is extremely useful for finding sections of code that require a high amount of processing time. Using the Profiler can help you find sections of code to focus on during optimization. If you suspect that a region of code runs slowly, then you can actually confirm that it isn't slow if it doesn't appear highlighted in the Profiler.

How to do it...

  1. Go to Debug | Start Diagnostic Tools Without Debugging…

  2. In the dialog shown in the preceding screenshot, select the type of analysis you'd like displayed. You can choose to analyze CPU Usage, GPU Usage, Memory Usage, or step through a Performance Wizard to assist you in selecting what you want to see.

  3. Click on the Start button at the bottom of the dialog.

  4. Stop the code after a brief time (less than a minute or two) to halt sample collection.

    Tip

    Do not collect too many samples or the Profiler will take a really long time to start up.

  5. Inspect the results that appear in the .diagsession file. Be sure...