Create a copy of and object in blueprint
I have an array of component's references, and i need to do a copy of each, but if I tyr to make a create by class i lost the data of the class because it's reset to its default values.
I really need a new instance of this object in this loop, but I didn't find any tools to do that in Blueprint, how can I duplicate this array with sames objects but new references.
Thanks in advance
asked Dec 02 '15 at 11:06 AM in Using UE4
As far as I understand the easiest way to do this is to create a new temporary variable of type Spell Component and assign it to the current array reference. That way you create only one Spell Component instance but use it for all elements in the array.
If you need to copy the whole array you could write a separate function which iterates all array elements and adds them to a new local array and then returns the array thus creating new references.
answered Oct 22 '17 at 10:38 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here