更新时间:2021-07-08 10:51:27
封面
版权页
Credits
About the Authors
About the Reviewer
www.PacktPub.com
eBooks discount offers and more
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Conventions
Reader feedback
Customer support
Chapter 1. UE4 Development Tools
Introduction
Installing Visual Studio
Creating and building your first C++ project in Visual Studio
Changing the code font and color in Visual Studio
Extension – changing the color theme in Visual Studio
Formatting your code (Autocomplete settings) in Visual Studio
Shortcut keys in Visual Studio
Extended mouse usage in Visual Studio
UE4 – installation
UE4 – first project
UE4 – creating your first level
UE4 – logging with UE_LOG
UE4 – making an FString from FStrings and other variables
Project management on GitHub – getting your Source Control
Project management on GitHub – using the Issue Tracker
Project management on VisualStudio.com – managing the tasks in your project
Project management on VisualStudio.com – constructing user stories and tasks
Chapter 2. Creating Classes
Making a UCLASS – deriving from UObject
Creating a user-editable UPROPERTY
Accessing a UPROPERTY from Blueprints
Specifying a UCLASS as the type of a UPROPERTY
Creating a Blueprint from your custom UCLASS
Instantiating UObject-derived classes (ConstructObject < > and NewObject < >)
Destroying UObject-derived classes
Creating a USTRUCT
Creating a UENUM( )
Creating a UFUNCTION
Chapter 3. Memory Management and Smart Pointers
Unmanaged memory – using malloc( )/free( )
Unmanaged memory – using new/delete
Managed memory – using NewObject< > and ConstructObject< >
Managed memory – deallocating memory
Managed memory – smart pointers (TSharedPtr TWeakPtr TAutoPtr) to track an object
Using TScopedPointer to track an object
Unreal's garbage collection system and UPROPERTY( )
Forcing garbage collection
Breakpoints and stepping through code
Finding bugs and using call stacks
Using the Profiler to identify hot spots
Chapter 4. Actors and Components
Creating a custom Actor in C++
Instantiating an Actor using SpawnActor
Destroying an Actor using Destroy and a Timer
Destroying an Actor after a delay using SetLifeSpan
Implementing the Actor functionality by composition
Loading assets into components using FObjectFinder
Implementing the Actor functionality by inheritance
Attaching components to create a hierarchy
Creating a custom Actor Component
Creating a custom Scene Component
Creating a custom Primitive Component
Creating an InventoryComponent for an RPG
Creating an OrbitingMovement Component
Creating a building that spawns units
Chapter 5. Handling Events and Delegates
Handling events implemented via virtual functions
Creating a delegate that is bound to a UFUNCTION
Unregistering a delegate
Creating a delegate that takes input parameters
Passing payload data with a delegate binding
Creating a multicast delegate
Creating a custom Event
Creating a Time of Day handler
Creating a respawning pickup for an First Person Shooter
Chapter 6. Input and Collision
Axis Mappings – keyboard mouse and gamepad directional input for an FPS character
Axis Mappings – normalized input
Action Mappings – one button responses for an FPS character
Adding Axis and Action Mappings from C++
Mouse UI input handling
UMG keyboard UI shortcut keys
Collision – letting objects pass through one another using Ignore
Collision – picking up objects using Overlap
Collision – preventing interpenetration using Block
Chapter 7. Communication between Classes and Interfaces
Creating a UInterface
Implementing a UInterface on an object
Checking if a class implements a UInterface