- Unreal Engine 4.x Scripting with C++ Cookbook
- John P. Doran William Sherif Stephen Whittle
- 109字
- 2025-02-28 12:28:30
There's more...
The NewObject function is what the OOP world refers to as a factory, and is a common design pattern. You ask the factory to make you the object; you don't go about constructing it by yourself. Using a factory pattern enables the engine to easily track objects as they are created.
For more information on design patterns, including the factory pattern, check out Design Patterns: Elements of Reusable Object-Oriented Software by Erich Gamma.
If you are interested in learning more about design patterns for game development, you may wish to check out Game Development Patterns and Best Practices, also available from Packt Publishing.
If you are interested in learning more about design patterns for game development, you may wish to check out Game Development Patterns and Best Practices, also available from Packt Publishing.