Adding More Variable Types to PhysicalMaterial.h

I’ve added the Engine and InputCore modules to the PhysicsCore.Build.cs:

using UnrealBuildTool;

public class PhysicsCore: ModuleRules
{
	public PhysicsCore(ReadOnlyTargetRules Target) : base(Target)
	{
        PublicIncludePaths.Add("Runtime/PhysicsCore/Public");

        PrivateDependencyModuleNames.AddRange(
			new string[] {
				"Core",
				"CoreUObject",
				"Engine",
				"InputCore"
			}
		);

I’ve added the #include "Materials/MaterialInterface.h" to the top of my PhysicalMaterial.h file, and I’ve added the same variable that you did:

	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = PhysicalProperties)
	TSoftObjectPtr<UMaterialInterface> TestInstance;

There are way fewer errors now :partying_face: but it still won’t compile. :frowning:

Severity	Code	Description	Project	File	Line	Suppression State
Warning	C4005	'TEXT': macro redefinition	...	C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\winnt.h	603	
Error (active)	E0145	member "FixedTagPrivate::FMapHandle::StoreIndexBits" may not be initialized	UE4	L:\UE4.27.2-Source\Engine\Source\Runtime\CoreUObject\Public\AssetRegistry\AssetDataTagMap.h	110	
Error (active)	E0028	expression must have a constant value	UE4	L:\UE4.27.2-Source\Engine\Source\Runtime\CoreUObject\Public\AssetRegistry\AssetDataTagMap.h	114	
Error (active)	E0145	member "FBulkDataStreamingToken::InvalidOffset" may not be initialized	UE4	L:\UE4.27.2-Source\Engine\Source\Runtime\CoreUObject\Public\Serialization\BulkData.h	132	
Error (active)	E0145	member "FBulkDataBase::InvalidToken" may not be initialized	UE4	L:\UE4.27.2-Source\Engine\Source\Runtime\CoreUObject\Public\Serialization\BulkData2.h	125	
Error (active)	E1574	static assertion failed with "TAtomic is only usable with trivial types"	UE4	L:\UE4.27.2-Source\Engine\Source\Runtime\Core\Public\Templates\Atomic.h	543	
Error (active)	E0145	member "FName::StringBufferSize" may not be initialized	UE4	L:\UE4.27.2-Source\Engine\Source\Runtime\Core\Public\UObject\NameTypes.h	471	
Error (active)	E0145	member "FNavigationLinkBase::InvalidUserId" may not be initialized	UE4	L:\UE4.27.2-Source\Engine\Source\Runtime\Engine\Classes\AI\Navigation\NavLinkDefinition.h	40	
Error (active)	E0145	member "FRayTracingGeometry::NonSharedVertexBuffers" may not be initialized	UE4	L:\UE4.27.2-Source\Engine\Source\Runtime\RenderCore\Public\RenderResource.h	665	
Error (active)	E0145	member "FShaderParameterBindings::kInvalidBufferIndex" may not be initialized	UE4	L:\UE4.27.2-Source\Engine\Source\Runtime\RenderCore\Public\Shader.h	601	
Error	C4273	'FBodyInstanceCore::FBodyInstanceCore': inconsistent dll linkage	...	L:\UE4.27.2-Source\Engine\Source\Runtime\PhysicsCore\Private\BodyInstanceCore.cpp	7	
Error	C4273	'FBodyInstanceCore::ShouldInstanceSimulatingPhysics': inconsistent dll linkage	...	L:\UE4.27.2-Source\Engine\Source\Runtime\PhysicsCore\Private\BodyInstanceCore.cpp	18	
Error	C4273	'LexToString': inconsistent dll linkage	...	L:\UE4.27.2-Source\Engine\Source\Runtime\PhysicsCore\Private\BodySetupCore.cpp	12	
Error	C4273	'LexToString': inconsistent dll linkage	...	L:\UE4.27.2-Source\Engine\Source\Runtime\PhysicsCore\Private\BodySetupCore.cpp	21	
Error	C4273	'LexToString': inconsistent dll linkage	...	L:\UE4.27.2-Source\Engine\Source\Runtime\PhysicsCore\Private\BodySetupCore.cpp	30	
Error	C4273	'UBodySetupCore::UBodySetupCore': inconsistent dll linkage	...	L:\UE4.27.2-Source\Engine\Source\Runtime\PhysicsCore\Private\BodySetupCore.cpp	39	
Error	C4273	'UBodySetupCore::GetCollisionTraceFlag': inconsistent dll linkage	...	L:\UE4.27.2-Source\Engine\Source\Runtime\PhysicsCore\Private\BodySetupCore.cpp	45	
Error	C4273	'OnUpdatePhysXMaterial': inconsistent dll linkage	...	L:\UE4.27.2-Source\Engine\Source\Runtime\PhysicsCore\Private\ChaosEngineInterface.cpp	12	
Error	C2491	'FPhysicsDelegatesCore::OnUpdatePhysXMaterial': definition of dllimport static data member not allowed	...	L:\UE4.27.2-Source\Engine\Source\Runtime\PhysicsCore\Private\ChaosEngineInterface.cpp	12	
Error	C4273	'LogPhysicsCore': inconsistent dll linkage	...	L:\UE4.27.2-Source\Engine\Source\Runtime\PhysicsCore\Private\PhysicsCore.cpp	5	
Error	C4273	'GetPhysXCookingModule': inconsistent dll linkage	...	L:\UE4.27.2-Source\Engine\Source\Runtime\PhysicsCore\Private\PhysXPublicCore.cpp	92	
Error	C4273	'GPhysXAllocator': inconsistent dll linkage	...	L:\UE4.27.2-Source\Engine\Source\Runtime\PhysicsCore\Private\PhysXSupportCore.cpp	11	
Error	C4273	'GPhysXSDK': inconsistent dll linkage	...	L:\UE4.27.2-Source\Engine\Source\Runtime\PhysicsCore\Private\PhysXSupportCore.cpp	13	
Error	C4273	'GPhysXPendingKillMaterial': inconsistent dll linkage	...	L:\UE4.27.2-Source\Engine\Source\Runtime\PhysicsCore\Private\PhysXSupportCore.cpp	15	
Error	C4273	'GApexSDK': inconsistent dll linkage	...	L:\UE4.27.2-Source\Engine\Source\Runtime\PhysicsCore\Private\PhysXSupportCore.cpp	18	
Error	C4273	'GApexModuleLegacy': inconsistent dll linkage	...	L:\UE4.27.2-Source\Engine\Source\Runtime\PhysicsCore\Private\PhysXSupportCore.cpp	21	
Error	C4273	'GApexModuleClothing': inconsistent dll linkage	...	L:\UE4.27.2-Source\Engine\Source\Runtime\PhysicsCore\Private\PhysXSupportCore.cpp	25	
Error	C4273	'FBodyInstanceCore::StaticStruct': inconsistent dll linkage	...	L:\UE4.27.2-Source\Engine\Intermediate\Build\Win64\UE4Editor\Inc\PhysicsCore\BodyInstanceCore.gen.cpp	20	
Error	C4273	'StaticStruct': inconsistent dll linkage	...	L:\UE4.27.2-Source\Engine\Intermediate\Build\Win64\UE4Editor\Inc\PhysicsCore\BodyInstanceCore.gen.cpp	30	
Error	C4273	'UBodySetupCore::StaticRegisterNativesUBodySetupCore': inconsistent dll linkage	...	L:\UE4.27.2-Source\Engine\Intermediate\Build\Win64\UE4Editor\Inc\PhysicsCore\BodySetupCore.gen.cpp	25	
Error	C4273	'UBodySetupCore::GetPrivateStaticClass': inconsistent dll linkage	...	L:\UE4.27.2-Source\Engine\Intermediate\Build\Win64\UE4Editor\Inc\PhysicsCore\BodySetupCore.gen.cpp	137	
Error	C4273	'StaticClass': inconsistent dll linkage	...	L:\UE4.27.2-Source\Engine\Intermediate\Build\Win64\UE4Editor\Inc\PhysicsCore\BodySetupCore.gen.cpp	139	
Error	C4273	'UBodySetupCore::UBodySetupCore': inconsistent dll linkage	...	L:\UE4.27.2-Source\Engine\Intermediate\Build\Win64\UE4Editor\Inc\PhysicsCore\BodySetupCore.gen.cpp	143	
Error	C4273	'StaticEnum': inconsistent dll linkage	...	L:\UE4.27.2-Source\Engine\Intermediate\Build\Win64\UE4Editor\Inc\PhysicsCore\ChaosEngineInterface.gen.cpp	225	

I feel like I’ve forgotten to add something, somewhere. :thinking: