C
C#2y ago
Costin

❔ [Unity] a great code design for Player-AI controller?

So I want to make all characters in my game be both controllable by AI, and also Player can switch to one of them. This includes the players having the exact same action features as AI.
2 Replies
TheBoxyBear
TheBoxyBear2y ago
There might be something better suited in Unity but in base C#, this sort of thing can be handled with interfaces. An interface for controllable characters that defines members common to players and AI
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.