Custom unity NPC system

For my current solo project that I am working on I have been setting up systems that are going to be helpful for creating the game experience I want to achieve. This is one of those systems.

Currently unity does have some NPC systems in place using its nav mesh system. The reason for me creating was mainly out of feedback I got during my Uken 2022 summer internship. I wanted to improve my programming skills further so I picked a topic and started designing a system that would both help me improve and give me a system I can use for future games.

I designed a grid for NPC path finding. Above is an example showing the grid that all NPCs can use. The grid has multiple views for debugging and options for customization. The grid can make change the amount of nodes per unit which will increase the complexity of the NPC’s path.

NPCs take in a schedule that determines what their current action will be. They will arrive at the location at a certain time (24 hour clock).

Although not perfect NPCs follow a realistic path and will try to avoid other NPCs within a certain distance.