Class forward declaration not working with UFUNCTION
Hello everyone, I was wondering if anyone could tell me why I'm getting this obscure error and how to fix it/what I'm doing wrong. So, in this code snippet:
I'm making a class forward declaration and using it in a function under UFUNCTION (Line 20), which to which i am aware should work without problem. However I'm getting the following error:
I have the same declaration in another header file with a similar function that compiles and the only difference is it doesn't have the UFUNCTION macro. My UE4 version is 4.15.2.
Any help is appreciated and apologies if this was asked/solved before.
Yep, that fixed it. An incorrect class.
So, in summary you have to have a functioning class (that successfully compiles) for it to work with UFUNCTION, forward declaration by itself doesn't work.
Thank you for your help, Kyle!
answered May 04 '17 at 03:38 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here