- Home /
How do I replicate Unity's movement/rotation/scaling handles?
I am working on a level editor for my game. Level editor will be purely in-game tool so I can't use any Unity Editor-specific classes in it.
How would I go about replicating Unity's object selection and transform handles?
These are the very handles I'm talking about.
Is this a level editor for you as developer to use or for your players? If it's the first, why work in runtime? You could ins$$anonymous$$d use all the convenient tools from the Editor class. Still, in runtime you could use Gizmos, but you'd be limited to the Unity Editor. If your making it for end-users, there's nothing pre-made by Unity. You have to use your own sprites, draw them like Gizmos and do everything from scratch. (Unless somebody can recommend a good Asset Store product.)
Assu$$anonymous$$g you want to build a game and have a level editor that is as-close-as-possible to Unity's Editor, you could just model the 3D objects yourself. To replicate all three modes of the editor could be a lengthy process, but it's definitely possible.
What about replicating them isn't straight-forward for you?
@Xarbrough, it's both. I plan to make level editor so powerful users can replicate basically every "campaign" level in it and I'll be doing levels in it as well.
@Addyarb, mainly whole "handles are drawn over everything else, despite depth" thing (while being still clickable). Also "static" scale, no matter how far you are from an object, handles have same size.
Well you can adjust the scale based on the distance from the object. That way it will seem static. Check out Vector3.Distance (); Does that make sense?
Answer by SvGampel · Apr 06, 2015 at 11:21 AM
Both links are more or less down, now, 5 years later. Care to update your answer? Would be awesome!
I've updated the wiki link. Of course I can't fix the dropbox link since dropbox has cancelled the support for public folders. The owner would need to generate an explicit sharing link for the file and update the link in the answer. Though if you check the users profile he hasn't been online during the last 4 years. So I doubt you get any reaction
Your answer
![](https://koobas.hobune.stream/wayback/20220613192248im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to keep gameobject transform relative to parent 1 Answer
Load data from file, if scene changed, fails to load location 0 Answers
how to move an object towards way position only ? 0 Answers
Why my code fires bullet at random positions? 2 Answers
Tile map (Unity plugin) please help it block my progress :( 1 Answer