Hi, and thank you for the tutorial. I'm having a hard time trying to trigger an interface function inside of my game mode I've adapted you code to mine : IMyInterface::Execute_MyFunction(GetWorld()->GetAuthGameMode()); I had to remove "this" otherwise visual says there are too many arguments, and I still get an error saying "argument of type AGameModeBase *" is incompatible with parameter of type "UObject *" I'm very confused, interfaces are meant to avoid casting, GameModeBase still comes from UObject, but here it seems I need to add a cast? Maybe also an include? GPT4 doesn't know so I hope I can get some advice, thanks
Thank you. Finally a zero bs video, clean and simple. Much appreciated! 😀👌
Excellent video 🔥. Liked and subscribed!
Welcome back :)
Greetings, GamedevCala
Hi, and thank you for the tutorial. I'm having a hard time trying to trigger an interface function inside of my game mode
I've adapted you code to mine :
IMyInterface::Execute_MyFunction(GetWorld()->GetAuthGameMode());
I had to remove "this" otherwise visual says there are too many arguments, and I still get an error saying "argument of type AGameModeBase *" is incompatible with parameter of type "UObject *"
I'm very confused, interfaces are meant to avoid casting, GameModeBase still comes from UObject, but here it seems I need to add a cast? Maybe also an include?
GPT4 doesn't know so I hope I can get some advice, thanks
Did you include the #include for GameMode?
@@KITATUS That was the issue, thanks a ton !!