By using the Profiler, we can create a recording of the game's performance as it's running, and then take a look at the stats to see how long it's taking our code to run.
To test this, we're going to need to purposely make some terrible code:
- Open the ThirdPersonCharacter Blueprint
- In the Event Graph, create the Tick event
- Create a ForLoop and connect it to the Tick event
- In the ForLoop, set the Last Index to 10000
- Create a new integer variable and name it TestInt
- Create a SET variable for TestInt and connect it to the Loop Body and Index outputs of the ForLoop
The code should look like this:
This is some horribly unoptimized code—and is perfect for our needs. Let's create the profile for our game.
Under the Play button's drop-down menu, make sure that the Number of Players is set to 1 if it was still set to 2 for our multiplayer...