Dragging waypoints to the editor

Good evening!

Recently I have started making a 2D platformer and I came up with an idea for easier level design. The point is that you could drag waypoints to the scene and unity connect them and make a mesh of them. I have already made the method for making a mesh of a list of points.

But for some reason I can’t find a solution for dragging the points into the screen and making them into a list effectively.

This isn’t the only problem I want this to happen before the play button pressed so I could design levels without go into play mode every time.

Do you have an idea for my problem?

I am currently using a static list and start method to determine when a waypoint prefab is dragged to the scene and then update there positions in every frame.

Hello,
in this video someone does something very similar, where he can define points (by clicking, also before Play) and drag them around to define a path. Instead of using these points to define a path, you would use them as input for your mesh creator script. Should be roughly what you are looking for if i understood you correctly:

Edit: Updated the video from introduction to episode 2 where points are added. Fits better.

1 Like

Thank you for your answer it’s really useful.