when I run this code I have to wait 2 sec to load it, how to make it more faster as possible?
Data Table has 50 rows, each row contain a skeletal mesh and its properties , icon, name, weight etc…
if (const UDataTable* WeaponDataTable = LoadObject<UDataTable>(GetWorld(), TEXT("/Game/DataTables/MyDataTable")))
{
for (auto& WeaponElemArray : WeaponDataTable->GetRowMap())
{
if (const FST_ItemWeapon * OutRow_Weapon = reinterpret_cast<const FST_ItemWeapon*>(WeaponElemArray.Value))
{
for (int32 i = 1; i <= OutRow_Weapon->ProbabilityPercent; i++)
{
//Adding items to the array
}
}
}
}