Extending StaticMeshComponent in plugin broken?

hello
since im still finding my way round plugins and ue4 c++ in general im not 100% sure this is a bug.

i have a plugin with a pawn class that works no problem, when i try to add a staticmeshcomponent class to the plugin it fails to compile. the error log is basically nonsense saying everything is an error.

is there a problem with this? do i need to post a project or anything?
thanks

Hi ,

Would you be able to provide the code you have so far for your plugin so we can take a look and see where things are going wrong?

thanks, sure. the plugin is here CarPlugin v0.4

the code that fails to compile is this,
added this in TestCarPrivatePCH.h

#include "UTegMeshComponent.h"

UTegMeshComponent.h

#pragma once

#include "UTegMeshComponent.generated.h"

UCLASS()
class TESTCAR_API UTegMeshComponent : public UStaticMeshComponent
{
	GENERATED_BODY()
	
};

UTegMeshComponent.cpp

#include "TestCarPrivatePCH.h"

Hi ,

How are you adding your new class files to the plugin? If you are doing this through Visual Studio, please double-check to make sure the files are being added in the correct place (by default, Visual Studio adds the new files into the project’s Intermediate folder). I added a new header and source file using the same names that you used, making sure they were properly placed into the correct Private and Public folders, then added the code you provided and was able to build the project and plugin without any problems.

hello . thanks. i added them by hand using windows explorer as i know about the intermediate thing. ive tried many times with different components and it always fails for me. guess theres something else im doing wrong.

Would it be possible to get the plugin with the MeshComponent files already added? I’ll also try again by adding the files with Windows Explorer and see if I get any different results.

Edit:
I tried adding the new files via Windows Explorer and it again built without any issues. I am probably missing something minor. If you can provide the plugin with the MeshComponent files already added, I can hopefully see what is happening.

Hi ,

We have not heard back from you for a while. Do you still need help with this issue? I will be marking this post as resolved for internal tracking purposes, but please feel free to add a comment and re-open the post at any time.