I found the answer in this post: Values of Expose on Spawn variables of Component are not set when doing BeginPlay - Blueprint - Unreal Engine Forums
To summarize: expose on spawn is not equivalent concept or part of the constructor of the actor/component/blueprint as one could think. In other words the events/begin play node may execute before the exposed on spawn variables are set. Workarounds include but not limited to:
- Add a small delay after your begin play node which will allow the exposed on spawn variables to be set.
- Use an initialize function after creation.
- Delegate the initialization responsibility to another actor (if architecture allows).
I feel this should resolve the issue here. However I do agree with the reports it is counter intuitive.
Some interesting follow-up questions could be:
- Why is this constraints? What benefits does it allow the engine? Concurrency?
- Could this behavior be changed to fall under the constructor idiom in blueprints?
- Is this improvement prioritized? Is there a tracker for it?