Hey guys,
I have a BaseClass that’s an Interface and a DerivedClass that inherits from that interface. I have another class say GameManager
that I want to wrangle all of the many interfaces I will have.
In my GameManager class, I need to call functions from the DerivedClass. I’m pretty sure that I need to spawn the DerivedClass and then cast from my BaseClass interface to it?
This is the step that confuses me because I’m not sure what exactly I need to do. If anyone could provide examples with code that would be incredibly helpful, I’ve been stuck on this problem for a while now and the wiki and docs don’t really help me with my use case. For example, in Rama’s wiki post, I’m unsure how they are using this reference:
//Some pointer is defined to any class inheriting from UObject
UObject* pointerToAnyUObject;