I didn’t asked to call it on any object, I want to call it on any object implementing the interface. My only problem was that I coudln’t get it to compile.
Yeah, that’s pretty much why I also wanted to return it, but I think I will use a different approach, more like a state machine. But I still need to pass the interface and returning it might still be useful.
So, thanks for the correct syntax TheJamsh and Gossy, I also tried to add ‘&’ after I looked into the generated gen.cpp and at the TScriptInterface constructor, but really wasn’t sure about it.