Set TArray Default Value UProperty
Hey guys, a quick question here. When declaring a UProperty that is TArray, how do you recommend to set the default values for said Variable inside the Header file?
I understand that the std method is by std::fill_n(array, index, value), but was curious to see how Unreal prefers data to be saved, especially within the header.
Could you provide an example of the recommended fashion? I'm particularly interested in how things like Enum Classes are stored within the declaration of the default Array Values.
Thank you very much!
Hey, As descibed on this question : https://answers.unrealengine.com/questions/183185/tarray-initialization.html
internaly is us std::initializer_list for this behaviour
But i'm not aware of any way to fill an array of size X with N as default value in the header
answered Dec 06 '18 at 03:32 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here