- Home /
Changing the starting position of a NavMesh Agent using the dropdown
Hello,
I have this 3D project for Unity that involves making a map where you choose your start and end points and the Navmesh Agent will automatically find the shortest route when I click on a button.
Before I get to that step, I'm trying to make it so that the dropdown list I built gets a list of all my waypoint GameObjects so that when I select an option in the dropdown, the navmesh agent will start at that point. So far I haven't been able to find the code that gets a list of those objects and puts it in the dropdown, and I haven't a clue on how to change the starting position based on the selection. I am familiar with how to make the agent go to its desired position, and how to make an array of waypoints. Just have to piece them together.
Can someone help me out with a sample C# script, or at least point me in the right direction? Thanks!
Your answer
![](https://koobas.hobune.stream/wayback/20220612050415im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Native Picker Wheel - iOS UI 0 Answers
Recieve an event when Dropdown is closed? 1 Answer
Dropdown not working with Oculus 3 Answers
Drop down menu not working how I expected 1 Answer
List to dropdown 0 Answers