Expose on spawn doesn't work for custom Components
BP_Slow seen on the screenshot is an ActorComponent. It has a variable called SlowingDownStrength. Everything works fine, when I set variable on Add [ComponentName] node's Details panel. But if I try to set this value from exposed node (here - using Literal Float), it seems to be ignored and value from Details takes effect instead. Is this a bug or am I doing something wrong? Is there any workaround to this problem?
asked Dec 14 '16 at 12:10 PM in Blueprint Scripting
I found the answer in this post: https://answers.unrealengine.com/questions/339643/values-of-expose-on-spawn-variables-of-component-a.html
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:
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:
answered Jul 04 '17 at 06:01 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here