LoginSignup
0
0

[UE5]C++プロジェクトでのフォルダの作り方

Last updated at Posted at 2023-06-03

C++でフォルダ作る方法をメモしておく

1.エクスプローラーでフォルダを作る

以下のパスに用意したいフォルダを作成。

プロジェクト名/Source/プロジェクト名

(ここではプロジェクト名をCppTest、フォルダ名をFunctionLibraryにして作成)

image.png

2.C++クラスを作成

フォルダに入れたいC++クラスを「New C++ Class」から作成

image.png

今回は「BlueprintFunctionLibrary」を作成
選んだらPathのところを先ほど作成したフォルダにしてあげる。

(作成してフォルダにある状態)
image.png

そしたら作成したクラスのcppファイルの中身こんな風に書き換える。

// Fill out your copyright notice in the Description page of Project Settings.


//	#include "FunctionLibrary/BPFLibrary.h"
//			作ったフォルダ名を削除!!
	#include "BPFLibrary.h"

//          こちらのほうがいいかも
#include "../FunctionLibrary/BPFLibrary.h"

image.png

これがかけたらコンパイル!!(ライブコーディングでも大丈夫)

これでフォルダ登場
image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0