Exploring solutions to common problems
We are going to explore a series of examples of Blueprint scripts where the intended result has been achieved but causes issues simply due to the approach taken. We will then offer an improved approach, which makes the Blueprint more performant, tidier, more reusable, or easier to expand at a later point in development. The purpose of this section is to help you begin to recognize potential areas for improvement within your own code, regardless of whether you are working in Blueprint or C++.
Important note
Everything we are about to look at in this section is bad code to prove a point. Even the fixes that follow are not perfect, but it has been written for the purpose of education and so is simplified somewhat.
For this section, you will need an empty project that you may have already created at the beginning of the chapter and the content
folder from the chapter2
branch of the GitHub link provided at the start of the chapter.
If you...