Including "StaticMesh.h" breaks my code
I'm trying to use a staticmesh in my component class. The issue is that its undefined unless I include the header(duh). But when I include the header it throws an error in an unrelated file.
D:\Unreal Engine\UnrealEngine\Engine\Source\Runtime\CoreUObject\Public\UObject/UObjectIterator.h(37): error C2660: 'GetObjectW': function does not take 0 arguments
I've not touched that file in any way. So how do I properly include StaticMesh.h?
My cpp file is in "Engine/source/Runtime/Engine/Classes/Components"
asked Jan 12 '18 at 04:34 PM in C++ Programming
Alright, I figured it out. The order you put the includes matter. I had my include closer to the bottom of my include list. When I moved it to the top I can build without errors now.
If anyone could elaborate on why that solved this problem that would be great though.
answered Jan 12 '18 at 05:14 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here