Hello and thanks for taking the time to read my problem,
I have an array that contains all the controllers that exists in my game, both PC’s and AI.
they are stored in a TArray<AController*> ConList
.
This list was populated by an iterator, so I don’t know which controllers are ai or pc without probing, though I could probably guess.
So, if I was to use Cast<AIController*>(ConList[i])
and Cast<APlayerController*>(ConList[i])
and failure/success of the cast to filter which is which, are there any problems I could encounter in the short or long term?
Is there a better way for me to do this?
alternatively, I can also store an identifying var @ the destination ptr with its type and reading that instead, but casting was the first thought.