I’m trying to call in my construction script of my actor some functions of his actor components. However it looks like the variables in the actor component doesn’t change at all. It looks like the construction script can’t call functions from the actor component.
It that true?
I can call those actor component functions fine after begin play.
I just ran into the same problem today. It appears to be a bug in the Unreal Editor
The issue is that the child component doesn’t yet have its values serialized in when the construction script for the owning actor is run. This is why you’re getting default values in response to your function calls. You can verify this is happening by changing the default values of the component. When the game is running the component has been properly initialized so the function returns the correct value.
The workaround for this that I’m going to try is to reverse the direction of the value transfer by moving the values into the parent actor and setting them in the child component in the construction script rather than the other way around.
This is still a problem in the engine. I would like to know if this is going to be addressed at all or if anyone has found a good workaround.