In general, it depends on the game. You say:
The first option seems suited for a LocalPlayerController because that's the naive way you normally read the mouse coordinates in the screen and adjust the deltaYaw and deltaPitch based on the deltaX and deltaY of the mouse.
But not on every game you don't.
Let us keep in mind that both sound like high level ...
I found a solution.
First of all, download the package in the link and put it in unity.
(required for 2D games)
Then you can follow how to do it from the link below: (Do what is explained up to the GEOMETRY OPTIONS heading.)
Finally, create a script for your object named &...
The current state-of-the-art for multithreading in Unity is the jobs system using the burst compiler. It not only gives you far more performance than regular C# code for most situations (at the cost of being restricted to a subset of the language), it also gives you multithreading managed by the engine itself. So you can just schedule parallel jobs and let ...
You could use a ComputeShader to offload the ai logic to your GPU, which is better in running parallel tasks, like AI pathing and the sorts.
Or just teach your AI chess with unity ml-agents, so that fuzzy logic and neural network make the AI more human and choose the best move that "feels right", and you could just edit the thinking time and have ...