Gutek8134
(Gutek8134)
March 3, 2023, 4:17pm
1
So, basically, I want to call this function in cpp on an instance received through TSubclassOf.GetDefaultObject()
I’ve tried to call it like
Instance->OnConstruction(Instance->GetTransform());
but to no avail, the array is empty. I cannot edit it directly in blueprint defaults, because it’s TArray of a custom struct.
Gutek8134
(Gutek8134)
March 7, 2023, 8:26pm
2
I’ve found a workaround - I’ve copied this code into a Blueprint Native Event and call it on every default object. I hope there’s an easier way to do it, though.
Call Instance->UserConstructionScript()
instead, OnConstruction is a different, native event.