Compiling fails as soon as I add a second UCLASS!?
Hello I started to develop an Artnet Plugin. Sending the packages works fine now. But when I wanted to programm a udp Receiver I ran in to some strange compiling errors. I'm using Visual Studio Community 2015.
I created the plugin in the unreal engine via going to plugins-> new plugin -> Blueprint library
my ArtNet.build.cs looks like this:
So in the "public" folder ther is my "ArtNetBPLibrary.h". It looks like this:
Everything works fine until here. It compiles and my blueprints work inside of Unreal. But when I add another declaration to the file it doesn't compile anymore. For example when I add this right below the code:
or the exact same error, when I add a Ustruct instead:
Unfortunately the error message is in german and I can't get my visual studio to report the errors in english! It says: "Diese Deklaration hat keine Speicherklasse oder keinen Typspezifizierer"
Any ideas on what I'm doing wrong? I also tried to make a new file for the "ArtNetUDPReceiver", but in this .h file it was exactly the same...
Any help is highly appreciated! Thanks in Advance, Johannes
asked Jul 29 '16 at 08:29 PM in C++ Programming
First thing i can see wrong here is fact that you not follow naming convention and it could mess up code generated by UHT. UObjects should start with letter "U", AActors with "A", Structs with "F"
2nd is that you use default int, reflection system does not support them due fact that each compiler for specific platform can have different default int size set (or else something changed that i don't know). Reflection system supports only int32 (Integer type in blueprints) and uint8 (Byte type in blueprints). If you use type unsupported by reflection system it can compile, but you will have useless invalid type pin in node or gray out text box in properties.
Also something tells me that UArtNetUDPReceiver is not just for static nodes, if this suppose to be a object that somebody can create it should derived from UObject not UBlueprintFunctionLibrary. UBlueprintFunctionLibrary is for node libraries with static functions that you can't assign to particular class. Also note that static classes work the same anywhere, it makes no difference for BP.
Follow this question
Once you sign in you will be able to subscribe for any updates here