LoginSignup
0
0

【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