up:: UE5.0.2
source:: 【UE5】マイナーなコンテナクラスについて - トンコツ開発ブログ
TTuple
複数の型を1つにまとめられるコンテナ。
型二つなら.Keyと.Valueで抜き出せる。三つ以上なら.Get<index>()
を使う。
TTuple<int32, float> tupleA(123, 0.5f);
int32 a = tupleA.Key; // 123
float b = tupleA.Value; // 0.5
TTuple<int32, float, FString> tupleB(123, 0.5f, "hoge");
int32 c = tupleB.Get<0>(); // 123
float d = tupleB.Get<1>(); // 0.5
FString e = tupleB.Get<2>(); // "hoge"