Creating "Tools" for level designer

I’m trying to create a tool where I can drag a prefab and with it there will be 2 “points” which I can freely move around the world space (only in the Editor for level design). The purpose of these 2 points are for them to return me their world space coordinates.

The easiest approach would be to create the 2 points (spheres or something) as children of the prefab but I’m looking for something which is more efficient and more logical.

Question: Is there a better approach to this? Maybe a customization of the Editor? I tried researching Handles but I didn’t get very far. I’m mainly looking for a direction or maybe names of classes that would help me in accomplishing this. Thanks!

P.S: Using Unity 5.1 and C#

Maybe expand on why you want these two points. I read your post like 4 times in a row to make sure I didn’t miss something. I don’t understand what you’re wanting to do. It’s possible there’s a much better method but it’ll be impossible to figure that out without a little more info. :slight_smile:

EDIT: Oh and welcome to the forums!

Thank you! :smile: Basically I want to create a movable platform (in run time) and I need the level designer to specify the movable limits (point 1 and point 2), to where it can extend/go. So I need the level designer to be able to drag these 2 points in the editor so that I can get their world space and process them in my script and treat these 2 points as the platform boundries.

Ok. I’ve done that before actually. I actually created a serialized array so that I could have any number of waypoints. Then I’d just slap in empty game objects in the scene in the order I wanted the movement. You could capture the vector3 positions and then delete the objects to save on memory, but the empty transform isn’t going to make any kind of noticeable hit on memory. If you’re just looking for 2 waypoints having those 2 empties on the prefab is a perfectly valid solution.

1 Like

I see. Alright, thank you for your time! :slight_smile: