My use case is that my combat system (attack, animation, etc) are stored into a different componentBP for each style (1 hand, bow, boxe, etc). When my character equip a different type of weapon, i want to be able to change the component to a new one. (and keep my custom events calling the right custom events in the component)
So my character BP has a component “CombatComponentRoot”. I tried to get this component as variable, so i can change this component at runtime by one of the childBP of this root component.
Yes you can use a component variable, and add/remove components at runtime, re-assigning the variable (provided it has BlueprintReadWrite if done in BP).
Just make sure whenever you call functions on that component you use the variable and not the default component reference in blueprints.
Thanks for your response and yet, I cannot find the solution. The engine does not let me add a value into the variable with the type component. The screenshoot to illustrate.