What's the nicest way to allow waypoints to be plotted from the Scene window?

I’m experimenting with making a game a bit like Tower 2011 where you can simulate Air Traffic Control, it’s essentially a top down 2d game looking down on an airport. To allow the planes to find their way around the airport I’ve created a waypoint system with a basic routing algorithm so they can move around which all works fine.

The problem is putting the waypoints in the correct location is pretty much trial and error, I have a list of vectors containing positions and some simple rendering code that uses Debug.DrawLine to draw an X where there’s a waypoint, so I can see where they are but plotting them involves putting in some coordinates, running the game to see where that ends up, tweaking it, re-running the game etc.

Is there a better way? I was thinking I could have simple (probably empty) game objects and just drop them in place over my map but I’d need a way to connect the waypoints and that’s where I get stuck.

If you want to build your own tools then take a look at Editor scripting. You can build custom inspectors and scene window controls to edit your data.

If you want to see some examples, take a look at something like ZestKit which has a helper to edit splines in the Editor: 4. Tweening Along a Spline · prime31/ZestKit Wiki · GitHub

Thanks, I’ll take a look!