i wanna know if there’s gonna be problem if I init them in the header files?
There will not be a problem as long as the values you initialize them with can be known at compile time.
The C++ guidelines recommend it over default constructors that do nothing except initializing member variables, but the reasoning behind that is not super important for UE development.
It has the additional advantage of letting users of the code see the default values right away without having to navigate to the .cpp file, which might not always be possible for proprietary code. Default values can also be documented easier when you’re auto-generating documentation from headers with software like Doxygen and the like.
3 Likes
okay thanks. i will init them in .h file then cuz there’s like 100 variables and i dont wanna type them out p