UE 4.1 Can't Inherit from FStaticMeshSceneProxy

I don’t know if this has been fixed in the latest release or not . But here is the link to the forum post

class FGeneratedMeshSceneProxy : public FStaticMeshSceneProxy
	{
	public:

		FGeneratedMeshSceneProxy(UHiglighttableStaticMeshComponent* Component)
			: FStaticMeshSceneProxy(Component)
			
		{
		}

		virtual ~FGeneratedMeshSceneProxy()
		{
			
		}

		virtual void DrawDynamicElements(FPrimitiveDrawInterface* PDI, const FSceneView* View, uint32 DrawDynamicFlags)
		{

		}

		
		virtual uint32 GetMemoryFootprint(void) const { return(sizeof(*this) + GetAllocatedSize()); }

		uint32 GetAllocatedSize(void) const { return(FPrimitiveSceneProxy::GetAllocatedSize()); }

	private:

	};

Errors:

Error	23	error MSB3073: The command ""C:\UnrealEngine - 4.1.1\UnrealEngine - 4.1.1\Engine\Build\BatchFiles\Build.bat" MyProjectEditor Win64 Development "C:\Users\i5\Documents\Unreal Projects\MyProject\MyProject.uproject"" exited with code -1.	C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets	38	5	MyProject
Error	20	error LNK2019: unresolved external symbol "public: virtual __cdecl FStaticMeshSceneProxy::FLODInfo::~FLODInfo(void)" (??1FLODInfo@FStaticMeshSceneProxy@@UEAA@XZ) referenced in function "public: void __cdecl TIndirectArray<class FStaticMeshSceneProxy::FLODInfo,class FDefaultAllocator>::Empty(int)" (?Empty@?$TIndirectArray@VFLODInfo@FStaticMeshSceneProxy@@VFDefaultAllocator@@@@QEAAXH@Z)	C:\Users\i5\Documents\Unreal Projects\MyProject\Intermediate\ProjectFiles\HiglighttableStaticMeshComponent.cpp.obj	MyProject
Error	8	error LNK2019: unresolved external symbol "public: __cdecl FStaticMeshSceneProxy::FStaticMeshSceneProxy(class UStaticMeshComponent *)" (??0FStaticMeshSceneProxy@@QEAA@PEAVUStaticMeshComponent@@@Z) referenced in function "public: __cdecl `public: virtual class FPrimitiveSceneProxy * __cdecl UHiglighttableStaticMeshComponent::CreateSceneProxy(void)'::`2'::FGeneratedMeshSceneProxy::FGeneratedMeshSceneProxy(class UHiglighttableStaticMeshComponent *)" (??0FGeneratedMeshSceneProxy@?1??CreateSceneProxy@UHiglighttableStaticMeshComponent@@UEAAPEAVFPrimitiveSceneProxy@@XZ@QEAA@PEAV2@@Z)	C:\Users\i5\Documents\Unreal Projects\MyProject\Intermediate\ProjectFiles\HiglighttableStaticMeshComponent.cpp.obj	MyProject
Error	15	error LNK2001: unresolved external symbol "public: virtual void __cdecl FStaticMeshSceneProxy::OnTransformChanged(void)" (?OnTransformChanged@FStaticMeshSceneProxy@@UEAAXXZ)	C:\Users\i5\Documents\Unreal Projects\MyProject\Intermediate\ProjectFiles\HiglighttableStaticMeshComponent.cpp.obj	MyProject
Error	19	error LNK2001: unresolved external symbol "public: virtual void __cdecl FStaticMeshSceneProxy::GetLightRelevance(class FLightSceneProxy const *,bool &,bool &,bool &,bool &)const " (?GetLightRelevance@FStaticMeshSceneProxy@@UEBAXPEBVFLightSceneProxy@@AEA_N111@Z)	C:\Users\i5\Documents\Unreal Projects\MyProject\Intermediate\ProjectFiles\HiglighttableStaticMeshComponent.cpp.obj	MyProject
Error	13	error LNK2001: unresolved external symbol "public: virtual void __cdecl FStaticMeshSceneProxy:rawStaticElements(class FStaticPrimitiveDrawInterface *)" (?DrawStaticElements@FStaticMeshSceneProxy@@UEAAXPEAVFStaticPrimitiveDrawInterface@@@Z)	C:\Users\i5\Documents\Unreal Projects\MyProject\Intermediate\ProjectFiles\HiglighttableStaticMeshComponent.cpp.obj	MyProject
Error	14	error LNK2001: unresolved external symbol "public: virtual void __cdecl FStaticMeshSceneProxy:rawDynamicElements(class FPrimitiveDrawInterface *,class FSceneView const *,unsigned int)" (?DrawDynamicElements@FStaticMeshSceneProxy@@UEAAXPEAVFPrimitiveDrawInterface@@PEBVFSceneView@@I@Z)	C:\Users\i5\Documents\Unreal Projects\MyProject\Intermediate\ProjectFiles\HiglighttableStaticMeshComponent.cpp.obj MyProject
Error	17	error LNK2001: unresolved external symbol "public: virtual struct FPrimitiveViewRelevance __cdecl FStaticMeshSceneProxy::GetViewRelevance(class FSceneView const *)" (?GetViewRelevance@FStaticMeshSceneProxy@@UEAA?AUFPrimitiveViewRelevance@@PEBVFSceneView@@@Z)	C:\Users\i5\Documents\Unreal Projects\MyProject\Intermediate\ProjectFiles\HiglighttableStaticMeshComponent.cpp.obj	MyProject
Error	16	error LNK2001: unresolved external symbol "public: virtual int __cdecl FStaticMeshSceneProxy::GetLOD(class FSceneView const *)const " (?GetLOD@FStaticMeshSceneProxy@@UEBAHPEBVFSceneView@@@Z) C:\Users\i5\Documents\Unreal Projects\MyProject\Intermediate\ProjectFiles\HiglighttableStaticMeshComponent.cpp.obj	MyProject
Error	11	error LNK2001: unresolved external symbol "public: virtual bool __cdecl FStaticMeshSceneProxy::GetWireframeMeshElement(int,class FMaterialRenderProxy const *,unsigned char,struct FMeshBatch &)const " (?GetWireframeMeshElement@FStaticMeshSceneProxy@@UEBA_NHPEBVFMaterialRenderProxy@@EAEAUFMeshBatch@@@Z)	C:\Users\i5\Documents\Unreal Projects\MyProject\Intermediate\ProjectFiles\HiglighttableStaticMeshComponent.cpp.obj	MyProject
Error	9	error LNK2001: unresolved external symbol "public: virtual bool __cdecl FStaticMeshSceneProxy::GetShadowMeshElement(int,unsigned char,struct FMeshBatch &)const " (?GetShadowMeshElement@FStaticMeshSceneProxy@@UEBA_NHEAEAUFMeshBatch@@@Z)	C:\Users\i5\Documents\Unreal Projects\MyProject\Intermediate\ProjectFiles\HiglighttableStaticMeshComponent.cpp.obj	MyProject
Error	10	error LNK2001: unresolved external symbol "public: virtual bool __cdecl FStaticMeshSceneProxy::GetMeshElement(int,int,unsigned char,struct FMeshBatch &,bool,bool)const " (?GetMeshElement@FStaticMeshSceneProxy@@UEBA_NHHEAEAUFMeshBatch@@_N1@Z)	C:\Users\i5\Documents\Unreal Projects\MyProject\Intermediate\ProjectFiles\HiglighttableStaticMeshComponent.cpp.obj	MyProject
Error	18	error LNK2001: unresolved external symbol "public: virtual bool __cdecl FStaticMeshSceneProxy::CanBeOccluded(void)const " (?CanBeOccluded@FStaticMeshSceneProxy@@UEBA_NXZ)	C:\Users\i5\Documents\Unreal Projects\MyProject\Intermediate\ProjectFiles\HiglighttableStaticMeshComponent.cpp.obj	MyProject
Error	12	error LNK2001: unresolved external symbol "protected: virtual void __cdecl FStaticMeshSceneProxy::SetIndexSource(int,int,struct FMeshBatch &,bool,bool)const " (?SetIndexSource@FStaticMeshSceneProxy@@MEBAXHHAEAUFMeshBatch@@_N1@Z)	C:\Users\i5\Documents\Unreal Projects\MyProject\Intermediate\ProjectFiles\HiglighttableStaticMeshComponent.cpp.obj	MyProject
Error	21	error LNK1120: 13 unresolved externals	C:\Users\i5\Documents\Unreal Projects\MyProject\Binaries\Win64\UE4Editor-MyProject.dll	MyProject
Error	22	error : Failed to produce item: C:\Users\i5\Documents\Unreal Projects\MyProject\Binaries\Win64\UE4Editor-MyProject.dll	C:\Users\i5\Documents\Unreal Projects\MyProject\Intermediate\ProjectFiles\ERROR	MyProject

I just upgraded to 4.4.2 and find that the FStaticMeshSceneProxy is now hidden outside the engine module

Hi TensaiSumo,

I have been working on replicating this issue today. What are the error messages that you are seeing when you upgraded your project to 4.4.2?

Hi ,

Inserting the ENGINE_API keyword exposes the class to me no problems. The error I got when the macro was not inserted in the new version is

E:\CarProject\Source\CarProject\HiglighttableStaticMeshComponent.cpp(18): error C2504: ‘FStaticMeshSceneProxy’ : base class undefined

the base class is undefined but in 4.1 the base class was defined and exposed but I was getting only linker errors as I stated above.

So everything is working for you now? I found that in 4.4.2 I needed to use the following include in addition to adding ENGINE_API to the class declaration.

#include "StaticMeshResources.h"

yes, guess I had that included before when experimenting :slight_smile: . Anyway thanks for the help .