Modular Waypoint System

  • To start create a new script
  • You will create a list to hold the waypoints
  • now you can add this script to your game object
  • to access the specific waypoints in the list you could just use their index like this
  • this is not very convenient to do when using the script for multiple game objects that have a varying number of waypoints
  • instead, create a variable to hold the current waypoint the game object is going to
  • this will allow you to pass this variable through the list and increment it for each individual game object

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store