Hello guys i have a problem and i need help.
I have 2 classes one is inherit from uobject
The_Shell_CameraConstraint
#pragma once
#include "Object.h"
#include "The_Shell_CameraConstraint.generated.h"
/**
*
*/
UCLASS()
class UThe_Shell_CameraConstraint : public UObject
{
GENERATED_UCLASS_BODY()
/*Camera position offset added to the POV position*/
UPROPERTY(EditAnywhere, Category = CameraConstraint)
FVector _offset;
/*Camera POV (Point of view)*/
UPROPERTY(EditAnywhere, Category = CameraConstraint, Meta = (DisplayName = "Point of view"))
FMinimalViewInfo _pov;
/*If true this camera will target the player*/
UPROPERTY(EditAnywhere, Category = CameraConstraint, Meta = (DisplayName = "Focus Player"))
bool _isFocusPlayer;
/*If true this camera will be fix*/
UPROPERTY(EditAnywhere, Category = CameraConstraint, Meta = (DisplayName = "Fixed"))
bool _isFix;
/*Camera position offset added by the origin of the volume. Use to compute some datas*/
UPROPERTY()
FVector _offsetFromVolumeCenter;
};
and a volume class that inherit from volume
.h
#include "The_Shell_CameraVolume.generated.h"
/**
*
*/
UCLASS()
class AThe_Shell_CameraVolume : public AVolume
{
GENERATED_UCLASS_BODY()
UPROPERTY(EditAnywhere, Instanced, Category = Camera, Meta = (DisplayName = "Camera Constraint"))
UThe_Shell_CameraConstraint* _cameraContraint;
private:
virtual void ReceiveActorBeginOverlap(class AActor* overlappingActor) OVERRIDE;
virtual void ReceiveActorEndOverlap(class AActor* overlappingActor) OVERRIDE;
};
.cpp
#include "The_Shell.h"
#include "The_Shell_CameraVolume.h"
AThe_Shell_CameraVolume::AThe_Shell_CameraVolume(const class FPostConstructInitializeProperties& PCIP)
: Super(PCIP)
{
_cameraContraint = NewObject<UThe_Shell_CameraConstraint>();
}
void AThe_Shell_CameraVolume::ReceiveActorBeginOverlap(class AActor* overlappingActor)
{
AThe_Shell_Character* character = Cast<AThe_Shell_Character>(overlappingActor);
if (character)
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Green, TEXT("You have enter the volume!"));
}
void AThe_Shell_CameraVolume::ReceiveActorEndOverlap(class AActor* overlappingActor)
{
AThe_Shell_Character* character = Cast<AThe_Shell_Character>(overlappingActor);
if (character)
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("You have exit the volume!"));
}
In the editor i update the data of volume camera constraint but when i try to save and error happen and i cant save
look at this
i dont know what i am doing wrong
Can someone help me please ?
Thanks