March 2019
Intermediate to advanced
708 pages
17h 9m
English
Unreal's editor UI is based on the concept of commands. Commands are a design pattern that allows looser coupling between the UI and the actions that it needs to perform.
To create a class that contains a set of commands, it is necessary to inherit from TCommands.
TCommands is a template class that leverages the Curiously Recurring Template Pattern (CRTP). The CRTP is used commonly throughout Slate UI code as a means of creating compile-time polymorphism.
In the initializer list for FCookbookCommands constructor, we invoke the parent class constructor, passing in a number of parameters: