How do I use an Enum as function Input in C++?
I am trying to make a weapon system from a tutorial. The Tutorial is in BP, but I at least want to define my Vars and Events in C++. Me makes a function, clicks "add input" and selects an already made Enum.
Here is how I made my Enum in C++:
And then I try to do the function:
When I do this, I get following error: Member variable declaration: Cannot declare enum at variable declaration
So I tried moving the Enum out of my Main Class. Which results in following error: Unrecognized type 'WeaponType'
You need to use UENUM insted of UPROPERTY on enum decleration, UPROPERTY is for varables not structures also read my comment
answered Jun 28 '14 at 12:31 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here