티스토리 뷰
언리얼
Error: Inappropriate '*' on variable of type 'CustomStruct', cannot have an exposed pointer to this type. 오류
쉬엄쉬엄하자 2021. 11. 18. 17:16728x90
언리얼 스트립트를 컴파일 할 때 제목과 같은 오류를 해결하는 방법에 대해 알아보겠습니다. Error: Inappropriate '*' on variable of type 'CustomStruct', cannot have an exposed pointer to this type.
사용자 정의 구조체를 USTRUCT를 통해 에디터에 노출 시키거나 블루프린트에서 활용하려고 할 때 USTRUCT의 포인터를 또다시 UPROPERTY로 하고자 할 때 발생합니다.
예제 코드
USTRUCT(Atomic)
struct FChangeViewInfo //사용자 정의 구조체
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere)
float NextChangeBetweenTime;
UPROPERTY(EditAnywhere)
AActor* NextView;
};
UCLASS()
class QUICKSTART_API ACameraDirector : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
ACameraDirector();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
UPROPERTY(EditAnywhere)
TArray<FChangeViewInfo*> ChangeViewInfoArray; //ERRRRRRRRRRRRRRRRRRRRRRR
float TimeToNextCameraChange;
int TargetCameraIndex;
};
이럴 때 오류를 해결하기 위한 아주 간단한 방법이 있습니다. 단지 포인터를 사용하지 않으면 됩니다.
value타입을 사용하거나 reference타입을 사용하면 오류를 해결할 수 있습니다.
'언리얼' 카테고리의 다른 글
언리얼 C++ 스크립팅 기초 숙달을 위한 튜토리얼 링크 (0) | 2021.11.18 |
---|---|
언리얼 SVN 소스컨트롤 "svn: E155007: 작업 사본이 아닙니다.(Not a working copy)" (0) | 2020.12.21 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- c언어 기초
- 젠킨스
- Unreal Header Tool
- Connecting Jenkins Agent
- 깃 용량문제
- 백준
- 언리얼
- UHT
- 언리얼 사용자 정의 구조체
- 언리얼 기초
- Jenkins Build Periodically
- 구글맵
- refusing to run with root privileges
- 깃 허브 오류 해결
- 안드로이드
- Connecting Jenkins
- 안드로이드 구글맵
- 알고리즘기초
- C언어기초
- Add Node
- 빌드 주기
- C++
- 언리얼 빌드
- 알고리즘
- dfs
- 젠킨스 에이전트 연결
- c언어강의
- Jenkins
- 유니티
- 유니티 직소퍼즐 구현
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
글 보관함