Summary of personal blueprint program design

1. Use a Controller (Actor) to implement a class of functions instead of implementing them directly in the class, (for example, for camera functions, use a Controller (Actor) to manage the camera class instead of implementing various functions in the camera class ) Benefits: easy management and expansion.

2. Use abstract methods more than concrete implementations. For example, controlling the movement of cars, airplanes, and ships, all of which belong to vehicles, can use interfaces to realize movements, and then implement movements in specific vehicles. The advantage is that the repeated code is reduced and the reusability is improved (if there is another means of transportation in the future, it is to increase the interface implementation instead of changing the original code).

3. It is better to call other events after the events that cannot be called, such as click event, event start, etc., instead of writing the program directly. Benefits: This type of event can be called elsewhere.

4. Try to call in UMG instead of implementation.

5. The performance consumption of the interface is less than that of Cast to

6. Taking the modulo (%) can allow integers to accumulate and cycle, the length is 5, 5%5=0, and cycle again.

7. Multi-use functions, events, and macros to improve code reusability

8. Multi-purpose function, fold to node, sequence, reduce code length

9. The for loop cannot be delayed. delay and timeline cannot be used in the for loop, but it can be used to add delay to the macro to make a for loop that can be delayed. (Copy the for loop code into the macro and add delay)

10. When doing logic that depends on another Evevt BeingPlay in Event BeingPlay, pay attention to the sequence. Therefore, generally do not do this, replace the logic of Event BeingPlay with a function, and call the modified function in another Evevt BeingPlay.

Guess you like

Origin blog.csdn.net/qq_52825422/article/details/130993341