This is amazing - I never expected this kind of response. I lost track of how many times i watched this tutorial: https://www.youtube.com/watch?v=zZDiC0aOXDY&list=PLLMq8iLsOoHFByikUMyNGVto6NMcr4TBU&index=20
I have deleted all code and copied your code via copy-n-paste, and I am still getting the same errors on the same lines. So there has to be something wrong with my system. I also noted even my spellcheck is failing.
I think i need to go back to the navmesh process, or maybe delete the whole file and start again. I did notice the tutorial was specific about the "mainCamera.Main instead of Camera.Main, (same with color.red vs Color.Red) its focus points like this i need to learn why this is showing different and not throwing errors. I know in the Unity update a few months ago a lot changed, that’s why i am using an older build (2023).
Regardless - this has been a great help.
This is humbling. I have developed a ton of military systems, firewalls, html (old school), software block and string development, Trouble Ticket Tracking systems installed world wide, and i never thought developing a game would be harder than all 15 years of previous training combined.
Hey - I think a demo/talk format (like the video you link) is a good way to pick up ideas and learn how pieces fit together, but not good to use as a tutorial where you’re copying the code.
I would start with something very simple. If you already have a terrain, learn how to bake a navmesh and visualize it. Then learn how to raycast from your mouse position on click event to the terrain, using a layer mask, and draw the resulting ray to make sure it’s working as expected. Then create a simple 3d capsule shape gameobject with CapsuleCollider and Rigidbody components, and gravity enabled. Start with it a bit above the terrain and make sure it falls and stops at the terrain when you enter game mode. Then add a NavMeshAgent component to your shape and connect the dots: use your raycast hit point to set the NavMeshAgent destination.
Find a focused/concise tutorial for each piece that you’re not sure how to do, and don’t move on to the next step until you understand why each piece works. Try it again without the tutorial and with some modifications.
Save CharacterController, animation, interactions for later. Just bite off small chunks at a time. It’s easy to get overwhelmed and discouraged, but with your background you can 100% learn this stuff