So I have been reading over the documentaiton on Actor lifecycles but I am having trouble trying to get my Actor to udate a Text render component in the ‘PostInitializeComponents’. I have setup a Test class, added a UTextRenderComponent and an FText:
In the constructor of my class, I create the UTextRenderComponent and attach it to the root. This all works fine and shows up in the editor, as does my variable.
But when I try to set the text of the component to the variable I change in the editor in the ‘PostInitializeComponents’, it just doesn’t work? I have debugged to make sure it is being hit and all the variables are correct. Closing and re-opening the editor does show the changed text, however, I want the text to update as I change it in the editor, similar to if I simply changed the Text field or did it in the Construction script of the Blueprint.
If I compile my blueprint, it was hitting the PostInitializeComponents, just not doing anything with my components. I assume this was because they were overwritted in a previous function. I used ‘PostLoad’ in components and that works fine in the editor, just couldn’t find a good/correct option for an actor.