Developer_Bastian

Unreal Engine - Iterate DataTable

Jan 10th, 2024 (edited)
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.59 KB | Gaming | 0 0
  1. // Developer Bastian © 2024
  2. // License Creative Commons DEED 4.0 (https://creativecommons.org/licenses/by-sa/4.0/deed.en)
  3. // Tutorial video at https://youtu.be/le4VYlJXASg
  4. // Part of an Unreal Basics video tutorial series at: https://bit.ly/Unreal_Basics_en
  5.  
  6. void ABA_DataLoader::OnReload()
  7. {
  8.     this->ConnectionsDT->ForeachRow<FConnectionInfo>(TEXT("DT_Connections::LoadTable")
  9.         , [this](const FName& Key, const FConnectionInfo& Value) mutable
  10.         {
  11.             ConnectionsMap.Add(Key, Value);
  12.             // set the ActiveConnection
  13.             if (Value.IsActiveConnection)
  14.                 this->ActiveConnection = Value;
  15.         }
  16.     );
  17. }
Add Comment
Please, Sign In to add comment