I have MyChar C++ class and BP_MyChar based on it. I call GetOwner()
from another cpp file, which returns BP_MyChar. How can I cast this result to MyChar Actor?
I tried AMyChar* Char = Cast<AMyChar*>(GetOwner());
but it fails to compile.
I have MyChar C++ class and BP_MyChar based on it. I call GetOwner()
from another cpp file, which returns BP_MyChar. How can I cast this result to MyChar Actor?
I tried AMyChar* Char = Cast<AMyChar*>(GetOwner());
but it fails to compile.
Hi Koldun,
just change it to Cast<AMyChar>(GetOwner());
- you don’t need the pointer…
Oh, it did work… Thanks!