[Unreal] Component 종류 Scene Component 컴포넌트 내용 헤더 UStaticMeshComponent 애니메이션이 없는 메시 #include "Components/StaticMeshComponent.h" UBoxComponent 박스 충돌체 #include "Components/BoxComponent.h" 2023. 10. 16. [Unreal] Component 추가 액터의 생성자에서 추가 1. 액터 멤버 변수로 컴포넌트 포인터를 선언 2. 액터 생성자에서 CreateDefaultSubobject로 컴포넌트를 생성하고 선언한 포인터에 설정 3. 컴포넌트를 루트 컴포넌트로 설정 4. 부모 - 자식관계를 설정하는 경우 자식컴포넌트->SetupAttachment(부모컴포넌트)로 관계를 설정 .h // Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "GameFramework/Actor.h" #include "MTObstacle.generated.h" UCLASS() class PATHFINDTEST_AP.. 2023. 10. 16. 이전 1 다음