I created a factory which allows me to create a DataTable for my Weapons attributes. The factory creates the object ok, but the values are garbage, attempting to edit the rows, causes a free memory crash on the heap. Am i doing something wrong?
UDataTable* UWeaponDataTableFactory::MakeNewDataTable(UObject* InParent, FName Name, EObjectFlags Flags)
{
UWeaponAttributeDataTable* WeapTable = NewObject<UWeaponAttributeDataTable>(InParent, Name, Flags);
WeapTable->AddRow(FName("AttributeSet_Weapon.RateOfFire"), FAttributeRow(600.f, 400.f, 800.f));
WeapTable->AddRow(FName("AttributeSet_Weapon.BaseDamage"), FAttributeRow(600.f, 400.f, 800.f));
//Blah
return WeapTable;
}
http://www.interkaos.com/grabs/mspaint_7VJvy46tgi.png
http://www.interkaos.com/grabs/devenv_CCOSgmBZ4b.png
http://www.interkaos.com/grabs/Discord_qYPlVEnTjy.png
Any help would be appreciated