2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【UE4:C++】BPで関数を呼び出すときのデフォルト引数を設定する

Posted at
コード
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context", sample = "-1"))
void SetSample(UObject const* context, int32 sample);

metaで設定してあげればいいらしい

contextの定義は主にBlueprintLibraryとかアクターじゃないクラスの関数に対していちいちselfとかピンに紐づけるの面倒だから楽になった

int32とか普通の変数はなんかそれっぽく試しにやってみたらできた
こういう情報探してもなかなか見つからない

上記コードを見ての通り、代入の仕方が統一されてなくてキモイ

2
2
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
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?