Really hope some of you can know the answer to this one.
I’m creating a system that will only run in construction script. The whole system run from one blueprint, lets call this Blueprint A
Blueprint A has some Child actors ( Child actor Bluepirnt B and C) which contain meshes. It must be possible to change material on these meshes in Bluepirnt B and C from Blueprint A in the de detail panel.
How could such a system/visual code look like?
How can I change material in a child actor bluepirnt from another actor blueprint all inside the construction script ?
I got it to work but now I ran into another problem
The Child Actor Blueprint B and C must be dynamic to replace, it must be possible to replace them with another bluepirnt.
Instance Editable variables are accessible at this point so the functionality can be contained in the actor itself.
May not be applicable in this very scenario, though… It would be nice if we could override the CAC in BPs like one can override the Widget Component and simply expose data pins
Okay. I just thought there might be a way around the “cast to node”, so that the user dont have to replace a new cast node every time they switch blueprint in “Child actor component variable”
But thank you for the answers and you time. both of you, I really appreciate it
Use an interface. No casting. No need to replace anything. Instead of the cast you’d send an interface message, and the receiving Child Actor can interpret it any way they need.
Not sure how to answer that. Interface calls a function. You can’t call an actor that has yet to be instantiated. If you’re worrying about actor popping up with the wrong material, it’s extremely unlikely. But you can always spawn it hidden, change material and then show it.