Hi, how can I use wild cards on string cases?
Thanks.
Are they child classes? Is casting totally necessary? I tried to stay away from casting as much as possible. If dad, kid and teacher are all children of a parent class all you’d have to do is cast to the parent class once instead for each case.
No they aren’t child. It is necessary to casting because I need their functions in the task behavior tree.
What about using an interface? You could setup the functionality in each of the classes then call the message from the AI. IDK just spitballing since there really isn’t a way to cast dynamically (at least to my knowledge).
Thank you. But I don’t know safety and performance in interfaces versus Casting. I think I should migrate to C++ in the future. Because it is less ambiguous.




