I’m tried to add a custom component to blueprint A by blueprint B at runtime.
If the custom component doesn’t have any variable “expose on spawn”,
everything will be fine.
Custom component will be added to blueprint A, variable will be set before beginplay.
However, if I add a variable with “expose on spawn” checked,
component will be added to wrong blueprint B,
and it won’t call beginplay or it calls beginplay without setting the variable.
Lots of strange things will happen.
Is this a bug?
Should I only call add component only in blueprint A?
Test Component is a custom component. I just call the add component function.
It’s a default function generated by Unreal for every class inherented to Actor Component.
I have attempted to reproduce your issue, but I haven’t been able to do so. Could you create and attach a simple test project that shows your issue so that I could get a better look at what’s causing the problem? Thank you.