Hello guys,
i found a small issue with TScriptInterface when passed by Blueprint to C++ in a function call.
Here’s an example:
Owning Unit correctly implements my interface, has a valid value, etc, but in this case the function receives in “Interested Entities” a TScriptInterface where the Object pointer is correct, while the Interface pointer is set to nullptr:
I temporarly solved it whit this code snippet:
for (auto& Entity : Data.InterestedEntities)
if (Entity.GetInterface() == nullptr)
Entity.SetInterface(Cast<IEntityInterface>(Entity.GetObject()));
Or another solution that works is to Cast OwningUnit to my interface before passing it to the array.
Both of this solutions sounds strange anyway, i would expect the TScriptInterface value to be valid.
