0
0

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 1 year has passed since last update.

【UE5】Enum値を文字列化する(自分メモ)

Posted at

全く覚えられず、毎回毎回 Web検索して探すハメになるので、ここにメモしておく。
UEnum::GetValueAsString()を使うとよい。

const EMyEnum MyEnumValue = GetMyEnumValue();
UE_LOG(LogTemp, Log, TEXT("MyEnumValue = %s"), *UEnum::GetValueAsString(MyEnumValue));

関数プロトタイプはこんな(↓)感じ:

class UEnum
{
    template <typename EnumType>
    static FString GetValueAsString(const EnumType EnumeratorValue);
};
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?