본문 바로가기

Unreal Engine4 or 5/코드11

언리얼 엔진 C++ 에서의 모듈 추가 모듈의 제작 규칙 1. 모듈의 이름과 동일한 폴더 2. 모듈의 빌드 규칙 파일 : 모듈이름.Build.cs 3. 프리컴파일드 헤더와 소스파일 : 모듈이름.h , 모듈이름.cpp 과정: Characters 모듈 추가 1. Characters 폴더생성-> 폴더명과 같은 cpp 와 h, build.cs 파일 생성 1-1. h에 아래와 같이 코드 추가 1 2 3 4 5 // Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "Engine.h" Colored by Color Scripter cs 1-2. cpp에 아래와 같이 추가 1 2 3 #include "Characters.h" IMP.. 2018. 12. 31.
UE4] Blueprint의 노출되는 함수. 참고 페이지 https://wiki.unrealengine.com/Custom_Blueprint_Node_Creation DisplayName = Blueprint에서 우클릭 액션으로 등장하는 목록의 보이는 이름이다.(그림 1, 4) CompactNodeTitle = 블루프린트 생성시 노드에 보여질 이름. Keywords = 해당 함수를 검색할 수 있는 키워드. Category = 말그대로 Category이며 |을 추가하여 하위 목록을 만들수 있다. 커멘트 삽입하기. /** * 내용. * @param 파라메터이름(대소문자구분) 파라메터 주석. */ [그림 1] [그림 2] [그림 3] [그림 4] [그림 5] 2017. 7. 19.
UE4 C++코드로 디폴트에 Mesh 불러오는법 1234567891011121314151617181920212223242526272829303132333435363738AStageFloor::AStageFloor(){ // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. PrimaryActorTick.bCanEverTick = true; RootComp = CreateDefaultSubobject(TEXT("Root")); RootComp->SetWorldLocation(FVector(0.0f, 0.0f, 0.0f)); RootCompScale = FVector(10.0f, 10.0f, 1.0f); Roo.. 2016. 5. 4.
UE4 게임플레이 타이머 * 코루틴(?) 현재 내용을 봐서는 코루틴과 비슷하다.FTimerManager에 함수를 등록 시킴으로써 활성화 되게 한다. 1234567 // 인자값 //( 타이머핸들 자료형 = FTimerHandle, //함수를 호출할 class, //호출할 함수, //함수 호출 빈도 (1.0f 이면 1초마다 호출한다.), //루프여부(true일경우 종료 조건이 있기 전까지 계속 앞에 지정한 Rate 마다 게속 호출되고, false 일 경우 한번 실행된뒤 자동으로 TimerManager에서 삭제된다.) GetWorldTimerManager().SetTimer(CountDownHandle, this, &ACountDown::AdvanceTimer, 1.0f, true);cs타이머를 시작하는 함수 , 코루틴과 다른점은 핸들이 필요하다는 .. 2016. 4. 26.