I need to repeat this code if the condition is false.
I need to use goto
or just recall the function under the if statement as I did? what is the best practice?
//Randomize Transforms of spawn Locations
RandomLocation(InGetAllTransformsRef, OutGetAllTransformsRef);
//look for already randomize spawn array if == -1 , repeat randomizing
if (UsedLocations.Find(OutGetAllTransformsRef) == -1)
{
RandomLocation(InGetAllTransformsRef, OutGetAllTransformsRef);
}
else
{
//some Code to continue the logic
}