Griev
(Griev)
1
UPROPERTY() does not work before declaring a variable of type UPhysicalMaterial. If i
If I set UPROPERTY() or UPROPERTY (EditDefaultsOnly) then the code does not compile and throw the error “unresolved external symbol”
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Components/PrimitiveComponent.h"
#include "PhysicalMaterials/PhysicalMaterial.h"
#include "Pickup.generated.h"
UCLASS()
class QUERRY_API APickup : public AActor, public IInteractionInterface
{
GENERATED_BODY()
public:
UPROPERTY(EditDefaultsOnly)
UPhysicalMaterial* Ph__Material;
APickup();
3dRaven
(3dRaven)
2
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Components/PrimitiveComponent.h"
#include "PhysicalMaterials/PhysicalMaterial.h"
#include "Pickup.generated.h"
class UPhysicalMaterial;
UCLASS()
class QUERRY_API APickup : public AActor, public IInteractionInterface
{
GENERATED_BODY()
public:
UPROPERTY(EditDefaultsOnly)
UPhysicalMaterial* Ph__Material;
APickup();
Then include it’s header #include "PhysicalMaterials/PhysicalMaterial.h" in the cpp and add PhysicsCore to your build.cs dependencies.
Did you add the PhysicsCore module to your build.cs file?
edit: Ah, 3dRaven beat me to it as I was writing my response. lol
system
(system)
Closed
4
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.