Hello,
I think the title sums it up but here is the issue that I am having.
this code works fine in the editor:
void UMovesContainer::ConstructMoveFromContainer(class ALevelGamemode* GameMode)
{
if (ContainerType != EContainerType::ECT_MoveFrom || !GameMode)
return;
ContainerSize = GameMode->GetNumMoveOptions();
if (PieceContatinerClass)
{
for (int32 i = 0; i < ContainerSize; i++)
{
USinglePieceContainer* CurrContainer = CreateWidget<USinglePieceContainer>(this, PieceContatinerClass);
MovesPanelBox->AddChild(CurrContainer);
CurrContainer->HoldPiece(GameMode->GetStartingPieces()[i]);
}
}
}
however, when I package the game I get this error:
[2023.04.18-04.43.37:997][239]LogWindows: Error: Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:C:\InstalledApps\Epic
Games\UE_5.1\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 763]
[2023.04.18-04.43.37:997][239]LogWindows: Error: Array index out of bounds: 0 from an array of size 0
[2023.04.18-04.43.37:997][239]LogWindows: Error: [Callstack] 0x00007ff6761675d8 ThinkAhead.exe!UMovesContainer::ConstructMoveFromContainer() [D:\UnrealEngine\ThinkAhead\Source\ThinkAhead\Widget\Move\MovesContainer.cpp:79]
Line 79 is CurrContainer->HoldPiece(GameMode->GetStartingPieces()[i]);
I am unsure how to see the call stack outside of the editor, so I am not sure how to handle this. I know someone probably can’t just tell me the issue, but If someone knows how to go about at least troubleshooting the packaged game, I would appreciate some advice.