I have a struct called FStruct and TArray of FStruct called ArrayOfStructs both declared in my header file. In my .cpp I want to create a new FStruct, assign certain variables to certain values, and put the FStruct into my ArrayOfStructs at index i. The only way I have found to create an FStruct that Allows me to assign the variables of that struct to certain values is as follows:
FStruct NewStruct; NewStruct.SomeActorPtr = SomeActorPtr; NewStruct.SomeActorPtrsRotation = NewStruct.SomeActorPtr->GetActorRotation();
If I use that code to add multiple structs to the array how will the structs be differentiated since they are all called “NewStruct”, or will they all be considered the same struct? If they are all the same how could I make different structs of the type “FStruct”?